C# Class Summer.Batch.Core.Scope.Context.StepContext

A context object that can be used to interrogate the current StepExecution and some of its associated properties using expressions based on bean paths. Has public getters for the step execution and convenience methods for accessing commonly used properties like the ExecutionContext associated with the step or its enclosing job execution.
Inheritance: Summer.Batch.Infrastructure.Repeat.Context.SynchronizedAttributeAccessor
Afficher le fichier Open project: SummerBatch/SummerBatch Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void

Clean up the context at the end of a step execution. Must be called once at the end of a step execution to honour the destruction callback contract from the Step Scope.

Equals ( object other ) : bool

Equals override.

GetHashCode ( ) : int

Overrides the default behaviour to provide a hash code based only on the step execution.

GetId ( ) : string

GetJobExecutionContext ( ) : object>.IReadOnlyDictionary

Returns the job execution context.

GetJobName ( ) : string

Convenient accessor for current job name identifier.

GetJobParameters ( ) : JobParameter>.IReadOnlyDictionary

Returns the job parameters.

GetStepExecutionContext ( ) : object>.IReadOnlyDictionary

Returns the step execution context.

GetStepName ( ) : string

Convenient accessor for current step name identifier. Usually this is the same as the bean name of the step that is executing (but might not be e.g. in a partition).

RegisterDestructionCallback ( string name, System.Threading.Tasks.Task callback ) : void

Allow clients to register callbacks for clean up on close.

RemoveAttribute ( string name ) : object

Override base class behaviour to ensure destruction callbacks are unregistered as well as the default behaviour.

StepContext ( StepExecution stepExecution ) : System

Create a new instance of StepContext for this StepExecution.

ToString ( ) : string

ToString override.

Private Methods

Méthode Description
UnregisterDestructionCallbacks ( string name ) : void

Unregisters destruction callback.

Method Details

Close() public méthode

Clean up the context at the end of a step execution. Must be called once at the end of a step execution to honour the destruction callback contract from the Step Scope.
public Close ( ) : void
Résultat void

Equals() public méthode

Equals override.
public Equals ( object other ) : bool
other object
Résultat bool

GetHashCode() public méthode

Overrides the default behaviour to provide a hash code based only on the step execution.
public GetHashCode ( ) : int
Résultat int

GetId() public méthode

public GetId ( ) : string
Résultat string

GetJobExecutionContext() public méthode

Returns the job execution context.
public GetJobExecutionContext ( ) : object>.IReadOnlyDictionary
Résultat object>.IReadOnlyDictionary

GetJobName() public méthode

Convenient accessor for current job name identifier.
public GetJobName ( ) : string
Résultat string

GetJobParameters() public méthode

Returns the job parameters.
public GetJobParameters ( ) : JobParameter>.IReadOnlyDictionary
Résultat JobParameter>.IReadOnlyDictionary

GetStepExecutionContext() public méthode

Returns the step execution context.
public GetStepExecutionContext ( ) : object>.IReadOnlyDictionary
Résultat object>.IReadOnlyDictionary

GetStepName() public méthode

Convenient accessor for current step name identifier. Usually this is the same as the bean name of the step that is executing (but might not be e.g. in a partition).
public GetStepName ( ) : string
Résultat string

RegisterDestructionCallback() public méthode

Allow clients to register callbacks for clean up on close.
public RegisterDestructionCallback ( string name, System.Threading.Tasks.Task callback ) : void
name string the callback id (unique attribute key in this context)
callback System.Threading.Tasks.Task a callback to execute on close
Résultat void

RemoveAttribute() public méthode

Override base class behaviour to ensure destruction callbacks are unregistered as well as the default behaviour.
public RemoveAttribute ( string name ) : object
name string
Résultat object

StepContext() public méthode

Create a new instance of StepContext for this StepExecution.
public StepContext ( StepExecution stepExecution ) : System
stepExecution StepExecution
Résultat System

ToString() public méthode

ToString override.
public ToString ( ) : string
Résultat string