jp.terasoluna.fw.batch.standard
クラス StandardThrowableHandler

java.lang.Object
  上位を拡張 jp.terasoluna.fw.batch.standard.StandardThrowableHandler
すべての実装されたインタフェース:
ThrowableHandler

public class StandardThrowableHandler
extends java.lang.Object
implements ThrowableHandler

ThrowableHandler インタフェースの標準実装クラス。

このクラスでは、Throwableの情報をログに出力し、 ジョブステータスを JobStatus.STATE.ENDING_ABNORMALLY に更新する。


フィールドの概要
private static Log log
          ログインスタンス。
 
コンストラクタの概要
StandardThrowableHandler()
           
 
メソッドの概要
 void handle(JobContext jobContext, java.lang.Throwable throwable, JobStatus jobStatus)
          Throwableに対する処理を行う。
protected  void writeErrorLog(JobStatus jobStatus, java.lang.Throwable throwable)
          Throwableのエラーログを出力する。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

log

private static final Log log
ログインスタンス。

コンストラクタの詳細

StandardThrowableHandler

public StandardThrowableHandler()
メソッドの詳細

handle

public void handle(JobContext jobContext,
                   java.lang.Throwable throwable,
                   JobStatus jobStatus)
Throwableに対する処理を行う。

このクラスでは、Throwableの情報をログに出力し、 ジョブステータスを JobStatus.STATE.ENDING_ABNORMALLY に更新する。

jobContextnullになる場合がある。

定義:
インタフェース ThrowableHandler 内の handle
パラメータ:
jobContext - ジョブコンテキスト
throwable - Throwable
jobStatus - ジョブステータス

writeErrorLog

protected void writeErrorLog(JobStatus jobStatus,
                             java.lang.Throwable throwable)
Throwableのエラーログを出力する。

パラメータ:
jobStatus - ジョブステータス
throwable - Throwable