public abstract static class Interceptor.Impl<TData,TResult,T extends java.lang.annotation.Annotation> extends java.lang.Object implements HandlerWrapper<TData,TResult>
Interceptorの処理内容を実装するクラスの抽象基底クラスとなるリクエストハンドラ。
 
 各インターセプションが付与されたときに行われるインターセプト処理の内容は、
 このクラスを継承して作成する。
 
 各Interceptorの値に指定されるクラスは、このクラスのサブクラスであり、
 インターセプトが行われると、そのサブクラスが実装するHandler.handle(Object, ExecutionContext)に処理が委譲される。
 この際、ラップされる前のリクエストハンドラをgetOriginalHandler()で取得できるので、
 各インターセプタ固有の処理を以下の例のように実装することができる。
 
 public HttpResponse handle(HttpRequest req, ExecutionContext ctx) {
     try {
         doBeforeAdvice(); // インターセプタによる前処理
         return getOriginalHandler().handle(req, ctx); // 本処理
     } catch(RuntimeException e) {
         doErrorHandling();  // インターセプタによる例外ハンドリング
         throw e;
     } finally {
         doAfterAdvice();  // インターセプタによる終端処理
     }
 }
 | コンストラクタと説明 | 
|---|
Impl()  | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
java.util.List<java.lang.Object> | 
getDelegates(TData data,
            ExecutionContext context)
このラッパーが処理を移譲するオブジェクトのリストを返す。 
 | 
T | 
getInterceptor()
処理対象の 
Interceptorを取得する。 | 
Handler<TData,TResult> | 
getOriginalHandler()
インターセプト対象のリクエストハンドラを取得する。 
 | 
void | 
setInterceptor(java.lang.annotation.Annotation annotation)
処理対象の 
Interceptorを設定する。 | 
void | 
setOriginalHandler(Handler<TData,TResult> originalHandler)
インターセプト対象のリクエストハンドラを設定する。 
 | 
@Published(tag="architect") public Impl()
public void setInterceptor(java.lang.annotation.Annotation annotation)
Interceptorを設定する。annotation - このクラスが実装するInterceptor@Published(tag="architect") public T getInterceptor()
Interceptorを取得する。Interceptorを取得する。@Published(tag="architect") public Handler<TData,TResult> getOriginalHandler()
public void setOriginalHandler(Handler<TData,TResult> originalHandler)
originalHandler - インターセプト対象のリクエストハンドラpublic java.util.List<java.lang.Object> getDelegates(TData data, ExecutionContext context)
getDelegates インタフェース内 HandlerWrapper<TData,TResult>data - ハンドラに対する入力データcontext - 実行コンテキスト