D
- 本タスクが処理する入力データの型public abstract class BatchActionBase<D> extends DbAccessSupport implements ExecutionHandlerCallback<CommandLine,Result>, nablarch.fw.TransactionEventCallback<D>
ExecutionHandlerCallback
インタフェースに関するNOP実装が与えられており、
必要に応じてオーバーライドできるようになっている。修飾子とタイプ | メソッドと説明 |
---|---|
protected void |
error(Throwable error,
ExecutionContext context)
実行時例外/エラーの発生によって本処理が終了した場合に一度だけ実行される。
|
void |
errorInExecution(Throwable error,
ExecutionContext context)
実行制御ハンドラが後続処理を実行した後、
後続のハンドラでエラーが発生した場合に呼ばれる。
|
protected void |
initialize(CommandLine command,
ExecutionContext context)
実行管理ハンドラ(
nablarch.fw.handler.ExecutionHandler )の本処理開始前に一度だけ実行される。 |
void |
postExecution(Result result,
ExecutionContext context)
実行制御ハンドラが後続処理を実行した後、正常、異常終了を問わず
処理が全て完了した直後に呼ばれる。
|
void |
preExecution(CommandLine commandLine,
ExecutionContext context)
実行制御ハンドラが後続処理を実行する前にコールバックされる。
|
protected void |
terminate(Result result,
ExecutionContext context)
本処理が終了した場合に一度だけ実行される。
|
void |
transactionAbnormalEnd(Throwable e,
D data,
ExecutionContext ctx) |
protected void |
transactionFailure(D inputData,
ExecutionContext context)
トランザクション処理が異常終了した場合に実行される。
|
void |
transactionNormalEnd(D data,
ExecutionContext ctx) |
protected void |
transactionSuccess(D inputData,
ExecutionContext context)
トランザクション処理が正常終了した場合に実行される。
|
protected void |
writeErrorLog(Object data,
String failureCode,
Object... msgOptions)
ERRORレベルで障害ログ出力を行う。
|
protected void |
writeFatalLog(Object data,
String failureCode,
Object... msgOptions)
FATALレベルで障害ログ出力を行う。
|
protected void |
writeLog(String msgId,
Object... msgOptions)
INFOレベルでログ出力を行う。
|
countByParameterizedSql, countByStatementSql, getParameterizedSqlStatement, getParameterizedSqlStatement, getSqlCStatement, getSqlPStatement, search
@Published protected void initialize(CommandLine command, ExecutionContext context)
nablarch.fw.handler.ExecutionHandler
)の本処理開始前に一度だけ実行される。
デフォルトでは何もしない。
必要に応じてオーバライドすること。command
- 起動コマンドラインcontext
- 実行コンテキスト@Published protected void error(Throwable error, ExecutionContext context)
error
- 本処理で発生した実行時例外/エラーcontext
- 実行コンテキスト@Published protected void terminate(Result result, ExecutionContext context)
result
- 本処理の実行結果context
- 実行コンテキスト@Published protected void transactionSuccess(D inputData, ExecutionContext context)
inputData
- 入力データcontext
- 実行コンテキスト@Published protected void transactionFailure(D inputData, ExecutionContext context)
inputData
- 入力データcontext
- 実行コンテキスト@Published protected void writeLog(String msgId, Object... msgOptions)
msgId
- メッセージIDmsgOptions
- メッセージIDから取得したメッセージに埋め込む値@Published protected void writeErrorLog(Object data, String failureCode, Object... msgOptions)
data
- 処理対象データfailureCode
- 障害コード(メッセージID)msgOptions
- 障害コードから取得したメッセージに埋め込む値@Published protected void writeFatalLog(Object data, String failureCode, Object... msgOptions)
data
- 処理対象データfailureCode
- 障害コード(メッセージID)msgOptions
- 障害コードから取得したメッセージに埋め込む値@Published(tag="architect") public final void preExecution(CommandLine commandLine, ExecutionContext context)
ExecutionHandlerCallback
preExecution
インタフェース内 ExecutionHandlerCallback<CommandLine,Result>
commandLine
- 入力データcontext
- 実行コンテキスト@Published(tag="architect") public final void errorInExecution(Throwable error, ExecutionContext context)
ExecutionHandlerCallback
errorInExecution
インタフェース内 ExecutionHandlerCallback<CommandLine,Result>
error
- 後続ハンドラの処理中に発生した実行時例外/エラーcontext
- 実行コンテキスト@Published(tag="architect") public final void postExecution(Result result, ExecutionContext context)
ExecutionHandlerCallback
ExecutionHandlerCallback.errorInExecution(Throwable, ExecutionContext)
の後で本メソッドが呼ばれる。postExecution
インタフェース内 ExecutionHandlerCallback<CommandLine,Result>
result
- ハンドラの戻り値となるオブジェクトcontext
- 実行コンテキスト@Published(tag="architect") public void transactionNormalEnd(D data, ExecutionContext ctx)
@Published(tag="architect") public void transactionAbnormalEnd(Throwable e, D data, ExecutionContext ctx)