C# Class Summer.Batch.Core.Step.AbstractStep

An IStepimplementation that provides common behavior to subclasses, including registering and calling listeners.
Inheritance: IStep, IInitializationPostOperations
Show file Open project: SummerBatch/SummerBatch

Public Methods

Method Description
AfterPropertiesSet ( ) : void

used programmatically by JobStepBuilder ... IInitializationPostOperations#AfterPropertiesSet.

Execute ( StepExecution stepExecution ) : void

Template method for step execution logic - calls abstract methods for resource initialization ( Open), execution Logic (DoExecute) and resource closing (Close).

RegisterStepExecutionListener ( IStepExecutionListener listener ) : void

Registers step execution listener.

SetStepExecutionListeners ( IStepExecutionListener listeners ) : void

Registers an array of step execution listeners.

ToString ( ) : string

ToString override.

Protected Methods

Method Description
AbstractStep ( ) : NLog

Default constructor.

AbstractStep ( string name ) : NLog

Custom constructor with name.

Close ( ExecutionContext ctx ) : void

Extension point for subclasses to provide callbacks to their collaborators at the end of a step, to close or release resources. Does nothing by default.

DoExecute ( StepExecution stepExecution ) : void

Extension point for subclasses to execute business logic. Subclasses should set the ExitStatus on the StepExecution before returning.

DoExecutionRegistration ( StepExecution stepExecution ) : void

Registers the StepExecution for property resolution via StepScope

DoExecutionRelease ( ) : void

Releases the most recent StepExecution

Open ( ExecutionContext ctx ) : void

Extension point for subclasses to provide callbacks to their collaborators at the beginning of a step, to open or acquire resources. Does nothing by default.

Private Methods

Method Description
DetermineBatchStatus ( Exception e ) : BatchStatus

Determines the step status based on the exception.

GetDefaultExitStatusForFailure ( Exception ex ) : ExitStatus

Default mapping from Exception to ExitStatus. Clients can modify the exit code using a StepExecutionListener.

HandleCloseAndRelease ( StepExecution stepExecution ) : void

HandleExecution ( StepExecution stepExecution ) : ExitStatus

HandleExecutionException ( StepExecution stepExecution, Exception e, ExitStatus exitStatus ) : ExitStatus

HandleListener ( StepExecution stepExecution, ExitStatus exitStatus ) : ExitStatus

HandleUpdateExecutionContext ( StepExecution stepExecution, ExitStatus exitStatus ) : ExitStatus

HandleUpdateStepExecution ( StepExecution stepExecution, ExitStatus exitStatus ) : void

Method Details

AbstractStep() protected method

Default constructor.
protected AbstractStep ( ) : NLog
return NLog

AbstractStep() protected method

Custom constructor with name.
protected AbstractStep ( string name ) : NLog
name string
return NLog

AfterPropertiesSet() public method

used programmatically by JobStepBuilder ... IInitializationPostOperations#AfterPropertiesSet.
 
public AfterPropertiesSet ( ) : void
return void

Close() protected method

Extension point for subclasses to provide callbacks to their collaborators at the end of a step, to close or release resources. Does nothing by default.
 
protected Close ( ExecutionContext ctx ) : void
ctx ExecutionContext
return void

DoExecute() protected abstract method

Extension point for subclasses to execute business logic. Subclasses should set the ExitStatus on the StepExecution before returning.
 
protected abstract DoExecute ( StepExecution stepExecution ) : void
stepExecution StepExecution
return void

DoExecutionRegistration() protected method

Registers the StepExecution for property resolution via StepScope
protected DoExecutionRegistration ( StepExecution stepExecution ) : void
stepExecution StepExecution
return void

DoExecutionRelease() protected method

Releases the most recent StepExecution
protected DoExecutionRelease ( ) : void
return void

Execute() public method

Template method for step execution logic - calls abstract methods for resource initialization ( Open), execution Logic (DoExecute) and resource closing (Close).
   
public Execute ( StepExecution stepExecution ) : void
stepExecution StepExecution
return void

Open() protected method

Extension point for subclasses to provide callbacks to their collaborators at the beginning of a step, to open or acquire resources. Does nothing by default.
 
protected Open ( ExecutionContext ctx ) : void
ctx ExecutionContext
return void

RegisterStepExecutionListener() public method

Registers step execution listener.
public RegisterStepExecutionListener ( IStepExecutionListener listener ) : void
listener IStepExecutionListener
return void

SetStepExecutionListeners() public method

Registers an array of step execution listeners.
public SetStepExecutionListeners ( IStepExecutionListener listeners ) : void
listeners IStepExecutionListener
return void

ToString() public method

ToString override.
public ToString ( ) : string
return string