Package jenkins.scm.api
Class SCMSourceEvent<P>
java.lang.Object
jenkins.scm.api.SCMEvent<P>
jenkins.scm.api.SCMSourceEvent<P>
- Type Parameters:
- P- the (provider specific) payload.
Base class for events relating to 
SCMSource instances.- Since:
- 2.0
- 
Nested Class SummaryNested classes/interfaces inherited from class jenkins.scm.api.SCMEventSCMEvent.Dispatcher<E extends SCMEvent<?>>, SCMEvent.EventQueueMetrics, SCMEvent.Type
- 
Field SummaryFields inherited from class jenkins.scm.api.SCMEventORIGIN_UNKNOWN
- 
Constructor SummaryConstructorsModifierConstructorDescriptionSCMSourceEvent(SCMEvent.Type type, long timestamp, P payload) Deprecated.SCMSourceEvent(SCMEvent.Type type, long timestamp, P payload, String origin) SCMSourceEvent(SCMEvent.Type type, P payload) Deprecated.SCMSourceEvent(SCMEvent.Type type, P payload, String origin) protectedSCMSourceEvent(SCMSourceEvent<P> src) 
- 
Method SummaryModifier and TypeMethodDescriptiondescriptionFor(SCMNavigator navigator) Return a description of the event in the context of the suppliedSCMNavigator.descriptionFor(SCMSource source) Return a description of the event in the context of the suppliedSCMSource.static voidfireLater(SCMSourceEvent<?> event, long delay, TimeUnit delayUnits) Fires theSCMSourceEventto all registeredSCMEventListenerinstances after the specified delay.static voidfireNow(SCMSourceEvent<?> event) Fires theSCMSourceEventto all registeredSCMEventListenerinstances.abstract StringReturns the name of theSCMSource, such as a repository name within an organization; may be used as anItem.getName().abstract booleanisMatch(SCMNavigator navigator) Tests if this event applies to the suppliedSCMNavigator.abstract booleanTests if this event applies to the suppliedSCMSource.Methods inherited from class jenkins.scm.api.SCMEventasCauses, closeExecutorService, description, equals, executorService, getDate, getEventProcessingMetrics, getOrigin, getPayload, getTimestamp, getType, hashCode, originOf, originOf, toString
- 
Constructor Details- 
SCMSourceEventDeprecated.
- 
SCMSourceEventpublic SCMSourceEvent(@NonNull SCMEvent.Type type, long timestamp, @NonNull P payload, @CheckForNull String origin) 
- 
SCMSourceEventDeprecated.
- 
SCMSourceEvent
- 
SCMSourceEvent
 
- 
- 
Method Details
- 
isMatchTests if this event applies to the suppliedSCMSource. (Calling this method for aSCMEvent.Type.CREATEDlogically could returntrueif there has been out of order or delayed delivery of events)- Parameters:
- source- the- SCMSource, the source must be- isMatch(SCMSource).
- Returns:
- trueif and only if this event concerns the supplied- SCMSource.
 
- 
descriptionForReturn a description of the event in the context of the suppliedSCMSource.- Parameters:
- source- the- SCMSource.
- Returns:
- the description or nullif no description can be provided.
- Since:
- 2.1.1
 
- 
getSourceNameReturns the name of theSCMSource, such as a repository name within an organization; may be used as anItem.getName(). Must be the same as the name that would be passed toSCMSourceObserver.observe(String)by anySCMNavigatorthatisMatch(SCMNavigator).DO NOT TRUST THE RETURN VALUES. Data from events should only be used as a rumour that requires verification. - Returns:
- the name of the SCMSource
 
- 
fireNowFires theSCMSourceEventto all registeredSCMEventListenerinstances.- Parameters:
- event- the event to fire.
 
- 
fireLaterFires theSCMSourceEventto all registeredSCMEventListenerinstances after the specified delay.- Parameters:
- event- the event to fire.
- delay- how long to wait before firing the event.
- delayUnits- the units of time in which the delay is expressed.