Package jenkins.scm.api
Class SCMHeadObserver.Selector
java.lang.Object
jenkins.scm.api.SCMHeadObserver
jenkins.scm.api.SCMHeadObserver.Selector
- Enclosing class:
- SCMHeadObserver
An observer that collects the
SCMRevision of a specific SCMHead and then stops observing.-
Nested Class Summary
Nested classes/interfaces inherited from class jenkins.scm.api.SCMHeadObserver
SCMHeadObserver.AllFinished, SCMHeadObserver.Any, SCMHeadObserver.Collector, SCMHeadObserver.Filter<O extends SCMHeadObserver>, SCMHeadObserver.Named, SCMHeadObserver.None, SCMHeadObserver.OneFinished, SCMHeadObserver.Selector, SCMHeadObserver.Wrapped<O extends SCMHeadObserver> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns information about whether the observer wants more results.voidobserve(SCMHead head, SCMRevision revision) Observes a head and current revision.result()Returns the result.
-
Constructor Details
-
Selector
Constructor.- Parameters:
head- theSCMHeadto get theSCMRevisionof.
-
-
Method Details
-
result
Returns the result.- Returns:
- the result.
-
observe
Observes a head and current revision.- Specified by:
observein classSCMHeadObserver- Parameters:
head- the head.revision- the revision.
-
isObserving
public boolean isObserving()Returns information about whether the observer wants more results.- Overrides:
isObservingin classSCMHeadObserver- Returns:
trueif the observer is still observing orfalseto signal that it is ok to stop early.
-
getIncludes
Returns the subset ofSCMHeadinstances that this observer is interested in ornullif interested in allSCMHeadinstances.Implementations should not assume that the
SCMHeadObserver.getIncludes()will be honoured. This method is designed to provide a hint toSCMSourceimplementations.- Overrides:
getIncludesin classSCMHeadObserver- Returns:
- the subset of
SCMHeadinstances that this observer is interested in ornull.
-