Package jenkins.scm.api
Class SCMSourceObserver.Filter<O extends SCMSourceObserver>
java.lang.Object
jenkins.scm.api.SCMSourceObserver
jenkins.scm.api.SCMSourceObserver.Wrapped<O>
jenkins.scm.api.SCMSourceObserver.Filter<O>
- Type Parameters:
- O- the type of observer being filtered.
- Enclosing class:
- SCMSourceObserver
public static class SCMSourceObserver.Filter<O extends SCMSourceObserver>
extends SCMSourceObserver.Wrapped<O>
An observer that filters the observed sources to a subset of named instances.
- Since:
- 2.0
- 
Nested Class SummaryNested classes/interfaces inherited from class jenkins.scm.api.SCMSourceObserverSCMSourceObserver.Filter<O extends SCMSourceObserver>, SCMSourceObserver.ProjectObserver, SCMSourceObserver.Wrapped<O extends SCMSourceObserver>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns the subset of "project" names that this observer is interested in ornullif interested in all "project" names.booleanReturns information about whether the observer wants more results.Declare that a new "project" such as a source repository has been found.Methods inherited from class jenkins.scm.api.SCMSourceObserver.WrappedaddAttribute, getContext, getListenerMethods inherited from class jenkins.scm.api.SCMSourceObserverfilter
- 
Constructor Details- 
FilterConstructor.- Parameters:
- delegate- the delegate.
- projectNames- the project names to filter.
 
 
- 
- 
Method Details- 
getIncludesReturns the subset of "project" names that this observer is interested in ornullif interested in all "project" names.Implementations should not assume that the SCMSourceObserver.getIncludes()will be honoured. This method is designed to provide a hint toSCMNavigatorimplementations.- Overrides:
- getIncludesin class- SCMSourceObserver.Wrapped<O extends SCMSourceObserver>
- Returns:
- the subset of "project" names that this observer is interested in or null.
- See Also:
 
- 
observe@NonNull public SCMSourceObserver.ProjectObserver observe(@NonNull String projectName) throws IllegalArgumentException, IOException, InterruptedException Declare that a new "project" such as a source repository has been found.- Overrides:
- observein class- SCMSourceObserver.Wrapped<O extends SCMSourceObserver>
- Parameters:
- projectName- a name of the project, such as a repository name within an organization; may be used as an- Item.getName()
- Returns:
- a secondary callback to customize the project, on which you must call SCMSourceObserver.ProjectObserver.complete()
- Throws:
- IllegalArgumentException- if this- projectNamehas already been encountered
- IOException- if observing this- projectNamecould not be completed due to an- IOException.
- InterruptedException- if observing this- projectNamewas interrupted.
 
- 
isObservingpublic boolean isObserving()Returns information about whether the observer wants more results.- Overrides:
- isObservingin class- SCMSourceObserver.Wrapped<O extends SCMSourceObserver>
- Returns:
- trueif the observer is still observing or- falseto signal that it is ok to stop early.
 
 
-