public abstract class AbstractStep extends java.lang.Object implements Step, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanNameAware
Step
実装。STEP_TYPE_KEY
コンストラクターと説明 |
---|
AbstractStep() デフォルトコンストラクター。 |
AbstractStep(java.lang.String name) name プロパティのみを設定するための便利なコンストラクター。 |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() |
protected void | close(ExecutionContext ctx) リソースを閉じるか解放するために、ステップの最後(finally ブロックの最後)でコラボレーターにコールバックを提供するサブクラスの拡張ポイント。 |
protected abstract void | doExecute(StepExecution stepExecution) ビジネスロジックを実行するサブクラスの拡張ポイント。 |
protected void | doExecutionRegistration(StepExecution stepExecution) StepScope によるプロパティ解決のために StepExecution を登録します |
protected void | doExecutionRelease() 最新の StepExecution をリリース |
void | execute(StepExecution stepExecution) ステップ実行ロジックのテンプレートメソッド - リソースの初期化( open(ExecutionContext) )、実行ロジック(doExecute(StepExecution) )およびリソースのクローズ(close(ExecutionContext) )の抽象メソッドを呼び出します。 |
protected StepExecutionListener | getCompositeListener() |
protected JobRepository | getJobRepository() |
java.lang.String | getName() |
int | getStartLimit() |
boolean | isAllowStartIfComplete() |
protected void | open(ExecutionContext ctx) ステップを開始するときにサブクラスがコラボレーターにコールバックを提供し、リソースを開いたり取得したりするための拡張ポイント。 |
void | registerStepExecutionListener(StepExecutionListener listener) ステップ実行の適切な段階で、コールバックのステップリスナーを登録します。 |
void | setAllowStartIfComplete(boolean allowStartIfComplete) ステップがすでに完了している場合にステップを再開するかどうかを決定するフラグのパブリック setter。 |
void | setBeanName(java.lang.String name) name プロパティがまだ設定されていない場合は設定します。 |
void | setJobRepository(JobRepository jobRepository) JobRepository のパブリック setter。 |
void | setName(java.lang.String name) name プロパティを設定します。 |
void | setStartLimit(int startLimit) startLimit のパブリック setter。 |
void | setStepExecutionListeners(StepExecutionListener[] listeners) 各オブジェクトをリスナーとして登録します。 |
java.lang.String | toString() |
public AbstractStep()
public AbstractStep(java.lang.String name)
name
- ステップの名前 public void afterPropertiesSet() throws java.lang.Exception
org.springframework.beans.factory.InitializingBean
の afterPropertiesSet
java.lang.Exception
public void setName(java.lang.String name)
name
- Step
の名前。setBeanName(java.lang.String)
public void setBeanName(java.lang.String name)
org.springframework.beans.factory.BeanNameAware
の setBeanName
BeanNameAware.setBeanName(java.lang.String)
public int getStartLimit()
Step
の getStartLimit
public void setStartLimit(int startLimit)
startLimit
- 設定する startLimitpublic boolean isAllowStartIfComplete()
Step
の isAllowStartIfComplete
public void setAllowStartIfComplete(boolean allowStartIfComplete)
allowStartIfComplete
- 設定するフラグの値 protected abstract void doExecute(StepExecution stepExecution) throws java.lang.Exception
StepExecution
に ExitStatus
を設定する必要があります。stepExecution
- 現在のステップのコンテキスト java.lang.Exception
- 実装によってスローされたチェック済み例外 protected void open(ExecutionContext ctx) throws java.lang.Exception
ctx
- 使用する ExecutionContext
java.lang.Exception
- 実装によってスローされたチェック済み例外 protected void close(ExecutionContext ctx) throws java.lang.Exception
ctx
- 使用する ExecutionContext
java.lang.Exception
- 実装によってスローされたチェック済み例外 public final void execute(StepExecution stepExecution) throws JobInterruptedException, UnexpectedJobExecutionException
open(ExecutionContext)
)、実行ロジック(doExecute(StepExecution)
)およびリソースのクローズ(close(ExecutionContext)
)の抽象メソッドを呼び出します。Step
の execute
stepExecution
- 実行するステップを表すエンティティ JobInterruptedException
- ステップが外部で中断された場合 UnexpectedJobExecutionException
protected void doExecutionRelease()
StepExecution
をリリース protected void doExecutionRegistration(StepExecution stepExecution)
StepScope
によるプロパティ解決のために StepExecution
を登録します stepExecution
- StepScoped Bean を水和するときに使用する StepExecutionpublic void registerStepExecutionListener(StepExecutionListener listener)
listener
- StepExecutionListener
public void setStepExecutionListeners(StepExecutionListener[] listeners)
listeners
- 既知の型のリスナーオブジェクトの配列。protected StepExecutionListener getCompositeListener()
public void setJobRepository(JobRepository jobRepository)
JobRepository
のパブリック setter。jobRepository
- 必須の依存関係です(デフォルトなし)。protected JobRepository getJobRepository()
public java.lang.String toString()
java.lang.Object
の toString