C# 클래스 Summer.Batch.Core.Job.AbstractJob

Abstract implementation of the IJob interface. Common dependencies such as a IJobRepository, IJobExecutionListener's, and various configuration parameters are set here. Therefore, common error handling and listener calling activities are abstracted away from implementations.
상속: IJob, IStepLocator, IInitializationPostOperations
파일 보기 프로젝트 열기: SummerBatch/SummerBatch

보호된 프로퍼티들

프로퍼티 타입 설명
Logger Logger

공개 메소드들

메소드 설명
AfterPropertiesSet ( ) : void

Post-init. checks. @see IInitializationPostOperations#AfterPropertiesSet.

Execute ( JobExecution execution ) : void

Executes job.

GetStep ( string stepName ) : IStep

To be overriden by subclasses.

GetStepNames ( ) : ICollection

To be overriden by subclasses.

RegisterJobExecutionListener ( IJobExecutionListener listener ) : void

Register a single listener for the IJobExecutionListener callbacks.

SetJobExecutionListeners ( IJobExecutionListener listeners ) : void

Public setter for injecting IJobExecutionListeners. They will all be given the listener callbacks at the appropriate point in the job.

ToString ( ) : string

ToString override.

보호된 메소드들

메소드 설명
AbstractJob ( ) : NLog

Default constructor.

AbstractJob ( string name ) : NLog

Custom constructor with a name.

DoExecute ( JobExecution execution ) : void

Actual job execution. To be implemented by sub-classes.

GetDefaultExitStatusForFailure ( Exception ex, JobExecution execution ) : ExitStatus

Computes exit status depending on exception.

HandleStep ( IStep step, JobExecution execution ) : StepExecution

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).

비공개 메소드들

메소드 설명
HandleException ( JobExecution execution, Exception e ) : void

Exception handling.

HandleExecution ( JobExecution execution ) : void

Actual job execution. Delegates to DoExecute.

HandleJobInterruptedException ( JobExecution execution, JobInterruptedException e ) : void

Job interruption handling.

HandlePostExecution ( JobExecution execution ) : void

Call to listeners that might add some post execution behaviour.

UpdateStatus ( JobExecution jobExecution, BatchStatus status ) : void

메소드 상세

AbstractJob() 보호된 메소드

Default constructor.
protected AbstractJob ( ) : NLog
리턴 NLog

AbstractJob() 보호된 메소드

Custom constructor with a name.
protected AbstractJob ( string name ) : NLog
name string
리턴 NLog

AfterPropertiesSet() 공개 메소드

Post-init. checks. @see IInitializationPostOperations#AfterPropertiesSet.
public AfterPropertiesSet ( ) : void
리턴 void

DoExecute() 보호된 추상적인 메소드

Actual job execution. To be implemented by sub-classes.
 
protected abstract DoExecute ( JobExecution execution ) : void
execution JobExecution
리턴 void

Execute() 공개 메소드

Executes job.
public Execute ( JobExecution execution ) : void
execution JobExecution
리턴 void

GetDefaultExitStatusForFailure() 보호된 메소드

Computes exit status depending on exception.
protected GetDefaultExitStatusForFailure ( Exception ex, JobExecution execution ) : ExitStatus
ex System.Exception
execution JobExecution
리턴 ExitStatus

GetStep() 공개 추상적인 메소드

To be overriden by subclasses.
public abstract GetStep ( string stepName ) : IStep
stepName string
리턴 IStep

GetStepNames() 공개 추상적인 메소드

To be overriden by subclasses.
public abstract GetStepNames ( ) : ICollection
리턴 ICollection

HandleStep() 보호된 메소드

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).
     
protected HandleStep ( IStep step, JobExecution execution ) : StepExecution
step IStep the step to execute
execution JobExecution the current job execution
리턴 StepExecution

RegisterJobExecutionListener() 공개 메소드

Register a single listener for the IJobExecutionListener callbacks.
public RegisterJobExecutionListener ( IJobExecutionListener listener ) : void
listener IJobExecutionListener
리턴 void

SetJobExecutionListeners() 공개 메소드

Public setter for injecting IJobExecutionListeners. They will all be given the listener callbacks at the appropriate point in the job.
public SetJobExecutionListeners ( IJobExecutionListener listeners ) : void
listeners IJobExecutionListener
리턴 void

ToString() 공개 메소드

ToString override.
public ToString ( ) : string
리턴 string

프로퍼티 상세

Logger 보호되어 있는 정적으로 프로퍼티

Logger.
protected static Logger Logger
리턴 Logger