Package io.jenkins.plugins.util
Klasse AbstractExecution<T>
java.lang.Object
org.jenkinsci.plugins.workflow.steps.StepExecution
org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<T>
io.jenkins.plugins.util.AbstractExecution<T>
- Typparameter:
T
- the type of the return value (useVoid
if no return value is available)
- Alle implementierten Schnittstellen:
Serializable
public abstract class AbstractExecution<T>
extends org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<T>
Base class for step executions. Provides several helper methods to obtain the defined
context
elements.- Autor:
- Ullrich Hafner
- Siehe auch:
-
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungprotected
AbstractExecution
(org.jenkinsci.plugins.workflow.steps.StepContext context) Creates a new instance ofAbstractExecution
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected ResultHandler
Creates aResultHandler
that sets build result of theRun
or stage.protected StageResultHandler
Veraltet.protected FilePath
Returns Jenkins' build folder.protected Optional
<hudson.remoting.VirtualChannel> Returns aVirtualChannel
to the agent where this step has been executed.protected Charset
getCharset
(String charset) Returns the default charset for the specified encoding string.protected Run
<?, ?> getRun()
Returns the associated pipeline run.protected TaskListener
Returns theTaskListener
for this execution.protected FilePath
Returns the workspace for this job.Von Klasse geerbte Methoden org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution
blocksRestart, getStatus, onResume, run, start, stop
Von Klasse geerbte Methoden org.jenkinsci.plugins.workflow.steps.StepExecution
applyAll, applyAll, getContext, getStatusBounded
-
Konstruktordetails
-
AbstractExecution
protected AbstractExecution(org.jenkinsci.plugins.workflow.steps.StepContext context) Creates a new instance ofAbstractExecution
.- Parameter:
context
- the context to use
-
-
Methodendetails
-
getRun
Returns the associated pipeline run.- Gibt zurück:
- the run
- Löst aus:
IOException
- if the run could not be resolvedInterruptedException
- if the user canceled the run
-
getChannel
protected Optional<hudson.remoting.VirtualChannel> getChannel() throws IOException, InterruptedExceptionReturns aVirtualChannel
to the agent where this step has been executed.- Gibt zurück:
- the channel
- Löst aus:
IOException
- if the computer could not be resolvedInterruptedException
- if the user canceled the run
-
getBuildFolder
Returns Jenkins' build folder.- Gibt zurück:
- the build folder
- Löst aus:
IOException
- if the build folder could not be resolvedInterruptedException
- if the user canceled the run
-
getWorkspace
Returns the workspace for this job. If the workspace does not yet exist, then the required folders are created.- Gibt zurück:
- the workspace
- Löst aus:
IOException
- if the workspace could not be resolvedInterruptedException
- if the user canceled the execution
-
getTaskListener
Returns theTaskListener
for this execution.- Gibt zurück:
- the task listener (or a silent listener if no task listener could be found)
- Löst aus:
InterruptedException
- if the user canceled the executionIOException
- if the task listener could not be resolved
-
getCharset
Returns the default charset for the specified encoding string. If the default encoding is empty ornull
, or if the charset is not valid, then the default encoding of the platform is returned.- Parameter:
charset
- identifier of the character set- Gibt zurück:
- the default charset for the specified encoding string
-
createStageResultHandler
@Deprecated protected StageResultHandler createStageResultHandler() throws InterruptedException, IOExceptionVeraltet.usecreateResultHandler()
insteadCreates aStageResultHandler
that sets the overall build result of theRun
.- Gibt zurück:
- a
StageResultHandler
that sets the overall build result of theRun
- Löst aus:
InterruptedException
- if the user canceled the executionIOException
- if the requiredFlowNode
instance is not found
-
createResultHandler
Creates aResultHandler
that sets build result of theRun
or stage.- Gibt zurück:
- a
ResultHandler
that sets the build result of theRun
or stage - Löst aus:
InterruptedException
- if the user canceled the executionIOException
- if the requiredFlowNode
instance is not found
-
createResultHandler()
instead