Class AbstractSpecificRunSelector
java.lang.Object
hudson.model.AbstractDescribableImpl<RunSelector>
org.jenkinsci.plugins.runselector.RunSelector
org.jenkinsci.plugins.runselector.selectors.AbstractSpecificRunSelector
- All Implemented Interfaces:
ExtensionPoint,Describable<RunSelector>
- Direct Known Subclasses:
BuildNumberRunSelector,PermalinkRunSelector
RunSelector enumerates only one build.
override {getBuild(Job, RunSelectorContext) instead.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Run<?, ?> getBuild(Job<?, ?> job, RunSelectorContext context) Override this method to implementAbstractSpecificRunSelector.final Run<?, ?> getNextBuild(Job<?, ?> job, RunSelectorContext context) Override this method to implementRunSelector.Methods inherited from class org.jenkinsci.plugins.runselector.RunSelector
getDisplayName, selectMethods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
AbstractSpecificRunSelector
public AbstractSpecificRunSelector()
-
-
Method Details
-
getNextBuild
@CheckForNull public final Run<?,?> getNextBuild(@NonNull Job<?, ?> job, @NonNull RunSelectorContext context) throws IOException, InterruptedExceptionOverride this method to implementRunSelector. UseRunSelectorContext.getLastMatchBuild()to continue enumerating builds. Or you can save the execution state withRunSelectorContext.addExtension(Object)- Overrides:
getNextBuildin classRunSelector- Parameters:
job- the job to pick a build from.context- context for the current execution of runselector.- Returns:
- the build matches this selector.
- Throws:
IOException- if an error occurs while performing the operation.InterruptedException- if any thread interrupts the current thread.
-
getBuild
@CheckForNull public abstract Run<?,?> getBuild(@NonNull Job<?, ?> job, @NonNull RunSelectorContext context) throws IOException, InterruptedExceptionOverride this method to implementAbstractSpecificRunSelector.- Parameters:
job- the job to pick a build from.context- context for the current execution of runselector.- Returns:
- the build to select
- Throws:
IOException- if an error occurs while performing the operation.InterruptedException- if any thread interrupts the current thread.
-