jp.terasoluna.fw.ex.aop.log
クラス BLogicLogInterceptor

java.lang.Object
  上位を拡張 jp.terasoluna.fw.ex.aop.log.BLogicLogInterceptor
すべての実装されたインタフェース:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class BLogicLogInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor

BLogicクラス処理実行前後のデバッグログを出力するためのインタセプタ

バージョン:
1.0.0

コンストラクタの概要
BLogicLogInterceptor()
           
 
メソッドの概要
protected  boolean checkException(Throwable target)
          ログ出力レベルの判定を行う。
 Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
          BLogicクラスの各メソッドの実行前後に、デバッグログを出力します。
 void setNoErrorLogExceptionLists(List<Class> noErrorLogExceptionLists)
          エラーログとして出力しない例外クラスリストを設定する
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

BLogicLogInterceptor

public BLogicLogInterceptor()
メソッドの詳細

setNoErrorLogExceptionLists

public void setNoErrorLogExceptionLists(List<Class> noErrorLogExceptionLists)
エラーログとして出力しない例外クラスリストを設定する

パラメータ:
noErrorLogExceptionLists - 例外クラスリスト

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
              throws Throwable
BLogicクラスの各メソッドの実行前後に、デバッグログを出力します。 また、メソッド実行中に例外が発生した場合、エラーログを出力します。

定義:
インタフェース org.aopalliance.intercept.MethodInterceptor 内の invoke
パラメータ:
invocation - インタセプタ対象のオブジェクト
戻り値:
インタセプタ適用後のオブジェクト
例外:
Throwable - 実行例外
関連項目:
invoke(org.aopalliance.intercept.MethodInvocation)

checkException

protected boolean checkException(Throwable target)
ログ出力レベルの判定を行う。
ERRORレベルでログを出力する例外の場合はtrue
DEGUGレベルでログを出力する例外の場合はfalse
を返す。

プロパティnoErrorLogExceptionListsに設定された例外、 もしくはそのサブクラスの例外であればfalseを返す。
それ以外はtrueを返す。

パラメータ:
target - チェック対象となる例外
戻り値:
ログ出力レベル判定値


Copyright © 2012. All Rights Reserved.