Summer.Batch.Core.Job.SimpleJob Class Reference

Simple implementation of IJob interface providing the ability to run a JobExecution. Sequentially executes a job by iterating through its list of steps. Any Step that fails will fail the job. The job is considered complete when all steps have been executed. More...

Inheritance diagram for Summer.Batch.Core.Job.SimpleJob:
Summer.Batch.Core.Job.AbstractJob Summer.Batch.Core.IJob Summer.Batch.Core.Step.IStepLocator Summer.Batch.Common.Factory.IInitializationPostOperations

Public Member Functions

 SimpleJob (string name)
 Custom constructor with a name. More...
 
 SimpleJob ()
 Default empty constructor. More...
 
void AddStep (IStep step)
 Add given step to the steps collection. More...
 
override IStep GetStep (string stepName)
 Returns the step given its name, or null if step could not be found. More...
 
override ICollection< string > GetStepNames ()
 Convenience method for clients to inspect the steps for this job. More...
 
- Public Member Functions inherited from Summer.Batch.Core.Job.AbstractJob
void Execute (JobExecution execution)
 Executes job. More...
 
override string ToString ()
 ToString override. More...
 
void AfterPropertiesSet ()
 Post-init. checks. More...
 
void SetJobExecutionListeners (IJobExecutionListener[] listeners)
 Public setter for injecting IJobExecutionListeners. They will all be given the listener callbacks at the appropriate point in the job. More...
 
void RegisterJobExecutionListener (IJobExecutionListener listener)
 Register a single listener for the IJobExecutionListener callbacks. More...
 

Protected Member Functions

override void DoExecute (JobExecution execution)
 Handler of steps sequentially as provided, checking each one for success before moving to the next. Returns the last StepExecution successfully processed if it exists, and null if none were processed. More...
 
- Protected Member Functions inherited from Summer.Batch.Core.Job.AbstractJob
 AbstractJob ()
 Default constructor. More...
 
 AbstractJob (string name)
 Custom constructor with a name. More...
 
StepExecution HandleStep (IStep step, JobExecution execution)
 Convenience method for subclasses to delegate the handling of a specific step in the context of the current JobExecution . Clients of this method do not need access to the JobRepository, nor do they need to worry about populating the execution context on a restart, nor detecting the interrupted state (in job or step execution). More...
 
ExitStatus GetDefaultExitStatusForFailure (Exception ex, JobExecution execution)
 Computes exit status depending on exception. More...
 

Properties

List< IStepSteps [set]
 Public setter for the steps in this job. Overrides any calls to AddStep(IStep)}. More...
 
- Properties inherited from Summer.Batch.Core.Job.AbstractJob
string Name [get, set]
 Name property. More...
 
bool Restartable [get, set]
 Restartable flag property. More...
 
IJobParametersIncrementer JobParametersIncrementer [get, set]
 job parameters incrementer property. More...
 
IJobParametersValidator JobParametersValidator [get, set]
 Job parameters validator property. More...
 
IJobRepository JobRepository [get, set]
 Job repository property. More...
 
- Properties inherited from Summer.Batch.Core.IJob
string Name [get, set]
 Name. More...
 
bool Restartable [get, set]
 Flag to indicate if this job can be restarted, at least in principle (Actual restartability is bound to the use of a persisted job repository). More...
 
IJobParametersIncrementer JobParametersIncrementer [get, set]
 If clients need to generate new parameters for the next execution in a sequence they can use this incrementer. The return value may be null, in the case that this job does not have a natural sequence. More...
 
IJobParametersValidator JobParametersValidator [get, set]
 A validator for the job parameters of a JobExecution. Clients of a Job may need to validate the parameters for a launch, before or during the execution. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from Summer.Batch.Core.Job.AbstractJob
static readonly Logger Logger = LogManager.GetCurrentClassLogger()
 Logger. More...
 

Detailed Description

Simple implementation of IJob interface providing the ability to run a JobExecution. Sequentially executes a job by iterating through its list of steps. Any Step that fails will fail the job. The job is considered complete when all steps have been executed.

Constructor & Destructor Documentation

Summer.Batch.Core.Job.SimpleJob.SimpleJob ( string  name)

Custom constructor with a name.

Parameters
name
Summer.Batch.Core.Job.SimpleJob.SimpleJob ( )

Default empty constructor.

Member Function Documentation

void Summer.Batch.Core.Job.SimpleJob.AddStep ( IStep  step)

Add given step to the steps collection.

Parameters
step
override void Summer.Batch.Core.Job.SimpleJob.DoExecute ( JobExecution  execution)
protectedvirtual

Handler of steps sequentially as provided, checking each one for success before moving to the next. Returns the last StepExecution successfully processed if it exists, and null if none were processed.

Parameters
execution

Implements Summer.Batch.Core.Job.AbstractJob.

override IStep Summer.Batch.Core.Job.SimpleJob.GetStep ( string  stepName)
virtual

Returns the step given its name, or null if step could not be found.

Parameters
stepName
Returns

Implements Summer.Batch.Core.Job.AbstractJob.

override ICollection<string> Summer.Batch.Core.Job.SimpleJob.GetStepNames ( )
virtual

Convenience method for clients to inspect the steps for this job.

Returns

Implements Summer.Batch.Core.Job.AbstractJob.

Property Documentation

List<IStep> Summer.Batch.Core.Job.SimpleJob.Steps
set

Public setter for the steps in this job. Overrides any calls to AddStep(IStep)}.


The documentation for this class was generated from the following file:
  • Summer.Batch.Core/Core/Job/SimpleJob.cs