Package nablarch.fw.web.interceptor
Class OnErrors.Impl
java.lang.Object
nablarch.fw.Interceptor.Impl<HttpRequest,HttpResponse,OnErrors>
nablarch.fw.web.interceptor.OnErrors.Impl
- All Implemented Interfaces:
Handler<HttpRequest,,HttpResponse> HandlerWrapper<HttpRequest,HttpResponse>
- Enclosing class:
- OnErrors
OnErrorsインターセプタの実装。- Author:
- Kiyohito Itoh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle(HttpRequest request, ExecutionContext context) 入力データに対する処理を実行する。Methods inherited from class nablarch.fw.Interceptor.Impl
getDelegates, getInterceptor, getOriginalHandler, setInterceptor, setOriginalHandler
-
Constructor Details
-
Impl
public Impl()
-
-
Method Details
-
handle
入力データに対する処理を実行する。このクラスの実装では、以下の処理を行う。 1.
OnErrorsアノテーションが付与されたhandleメソッドを実行する。 2a. 1.の結果、RuntimeExceptionが発生した場合は次の処理を行う。OnErrors.value()に指定された順に、発生した例外クラスがOnError.type()にマッチするか調べる。 マッチした場合は、OnError.statusCode()とOnError.path()を使用してHttpErrorResponseを送出する。 マッチしない場合は、発生した例外をそのまま送出する。 2b. 1.の結果、RuntimeExceptionが発生しない場合は、1.の結果をそのまま返却する。- Parameters:
request- 入力データcontext- 実行コンテキスト- Returns:
- 処理結果データ
-