Class FlowExecutionOwner
java.lang.Object
org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner
- All Implemented Interfaces:
Serializable
We need something that's serializable in small moniker that helps us find THE instance
of
FlowExecution
.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Marker interface for queue executables fromgetExecutable()
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FlowExecutionOwner
A placeholder implementation for use in compatibility stubs.abstract boolean
FlowExecutionOwner
s are equal to one another if and only if they point to the sameFlowExecution
object.abstract FlowExecution
get()
abstract Queue.Executable
The executor slot running this flow, such as aRun
.Gets a listener to which we may print general messages.Same asget()
but avoids throwing an exception or blocking.abstract File
A directory (on the controller) where information may be persisted.abstract String
getUrl()
Returns the URL of the model object that ownsFlowExecution
, relative to the context root of Jenkins.abstract int
hashCode()
Needs to be overridden as theequals(Object)
method is overridden.
-
Constructor Details
-
FlowExecutionOwner
public FlowExecutionOwner()
-
-
Method Details
-
get
- Throws:
IOException
- if fails to findFlowExecution
.
-
getOrNull
Same asget()
but avoids throwing an exception or blocking.- Returns:
- a valid flow execution, or null if not ready or invalid
-
getRootDir
A directory (on the controller) where information may be persisted.- Throws:
IOException
- See Also:
-
getExecutable
The executor slot running this flow, such as aRun
. The conceptual "owner" ofFlowExecution
. (For anything that runs for a long enough time that demands flow, it better occupies an executor. So this type restriction should still enable scriptler to use this.)- Returns:
- preferably an
FlowExecutionOwner.Executable
- Throws:
IOException
-
getUrl
Returns the URL of the model object that ownsFlowExecution
, relative to the context root of Jenkins. This is usually not the same object as 'this'. This object must have thegetExecution()
method to bindFlowExecution
to the URL space (or otherwise overridegetUrlOfExecution()
).- Returns:
- String like "job/foo/32/" with trailing slash but no leading slash.
- Throws:
IOException
-
getUrlOfExecution
- Throws:
IOException
-
equals
FlowExecutionOwner
s are equal to one another if and only if they point to the sameFlowExecution
object. -
hashCode
public abstract int hashCode()Needs to be overridden as theequals(Object)
method is overridden. -
getListener
Gets a listener to which we may print general messages. NormallyStepContext.get(java.lang.Class<T>)
should be used, but in some cases there is no associated step.The listener should be remotable: if sent to an agent, messages printed to it should still appear in the log. The same will then apply to calls to
StepContext.get(java.lang.Class<T>)
onTaskListener
.- Throws:
IOException
-
dummyOwner
A placeholder implementation for use in compatibility stubs.
-