Package jenkins.scm.api
Class SCMNavigatorEvent<P>
- java.lang.Object
-
- jenkins.scm.api.SCMEvent<P>
-
- jenkins.scm.api.SCMNavigatorEvent<P>
-
- Type Parameters:
P
- the (provider specific) payload.
public abstract class SCMNavigatorEvent<P> extends SCMEvent<P>
Base class for events relating toSCMNavigator
instances.- Since:
- 2.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jenkins.scm.api.SCMEvent
SCMEvent.Dispatcher<E extends SCMEvent<?>>, SCMEvent.EventQueueMetrics, SCMEvent.Type
-
-
Field Summary
-
Fields inherited from class jenkins.scm.api.SCMEvent
ORIGIN_UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description SCMNavigatorEvent(SCMEvent.Type type, long timestamp, P payload)
Deprecated.SCMNavigatorEvent(SCMEvent.Type type, long timestamp, P payload, String origin)
SCMNavigatorEvent(SCMEvent.Type type, P payload)
Deprecated.SCMNavigatorEvent(SCMEvent.Type type, P payload, String origin)
protected
SCMNavigatorEvent(SCMNavigatorEvent<P> src)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
descriptionFor(SCMNavigator navigator)
Return a description of the event in the context of the suppliedSCMNavigator
.static void
fireLater(SCMNavigatorEvent<?> event, long delay, TimeUnit delayUnits)
Fires theSCMNavigatorEvent
to all registeredSCMEventListener
instances after the specified delay.static void
fireNow(SCMNavigatorEvent<?> event)
Fires theSCMNavigatorEvent
to all registeredSCMEventListener
instances.abstract boolean
isMatch(SCMNavigator navigator)
Tests if this event applies to the suppliedSCMNavigator
.-
Methods inherited from class jenkins.scm.api.SCMEvent
asCauses, closeExecutorService, description, equals, executorService, getDate, getEventProcessingMetrics, getOrigin, getPayload, getTimestamp, getType, hashCode, originOf, toString
-
-
-
-
Constructor Detail
-
SCMNavigatorEvent
@Deprecated public SCMNavigatorEvent(@NonNull SCMEvent.Type type, long timestamp, @NonNull P payload)
Deprecated.
-
SCMNavigatorEvent
public SCMNavigatorEvent(@NonNull SCMEvent.Type type, long timestamp, @NonNull P payload, @CheckForNull String origin)
-
SCMNavigatorEvent
@Deprecated public SCMNavigatorEvent(@NonNull SCMEvent.Type type, @NonNull P payload)
Deprecated.
-
SCMNavigatorEvent
public SCMNavigatorEvent(@NonNull SCMEvent.Type type, @NonNull P payload, @CheckForNull String origin)
-
SCMNavigatorEvent
protected SCMNavigatorEvent(@NonNull SCMNavigatorEvent<P> src)
-
-
Method Detail
-
isMatch
public abstract boolean isMatch(SCMNavigator navigator)
Tests if this event applies to the suppliedSCMNavigator
.- Parameters:
navigator
- theSCMNavigator
.- Returns:
true
if and only if this event concerns the suppliedSCMNavigator
.
-
descriptionFor
@CheckForNull public String descriptionFor(SCMNavigator navigator)
Return a description of the event in the context of the suppliedSCMNavigator
.- Parameters:
navigator
- theSCMNavigator
, the navigator must beisMatch(SCMNavigator)
.- Returns:
- the description or
null
if no description can be provided. - Since:
- 2.1.1
-
fireNow
public static void fireNow(@NonNull SCMNavigatorEvent<?> event)
Fires theSCMNavigatorEvent
to all registeredSCMEventListener
instances.- Parameters:
event
- the event to fire.
-
fireLater
public static void fireLater(@NonNull SCMNavigatorEvent<?> event, long delay, TimeUnit delayUnits)
Fires theSCMNavigatorEvent
to all registeredSCMEventListener
instances 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.
-
-