public class HttpMethodBinding extends MethodBinding<HttpRequest,HttpResponse> implements HttpRequestHandler
 HTTPリクエストのメソッド名とリクエストURIの値をもとに、
 動的に委譲先となるメソッド決定する。
  例:
    [HTTPリクエストライン]               [委譲先メソッド名]
    GET  /foo/baa/dynamic_page.jsp  ->  getDynamicPageJsp()
    POST /foo/baa/message           ->  postMessage()
  ディスパッチ処理の詳細仕様は、handle(HttpRequest, ExecutionContext) を参照。
 | Modifier and Type | Class and Description | 
|---|---|
static class  | 
HttpMethodBinding.Binder
HttpMethodBindingのファクトリクラス 
 | 
SCOPE_VAR_NAME_BOUND_CLASS, SCOPE_VAR_NAME_BOUND_METHOD| Constructor and Description | 
|---|
HttpMethodBinding(java.lang.Object delegate)
指定されたオブジェクトに処理を委譲するディスパッチャを作成する。 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected java.lang.reflect.Method | 
getMethodBoundTo(HttpRequest req,
                ExecutionContext ctx)
入力データおよび実行コンテキストの内容に応じて、委譲対象のメソッドを決定する。 
 | 
HttpResponse | 
handle(HttpRequest req,
      ExecutionContext ctx)
getMethodBoundTo() で取得したメソッドに対して後続処理を委譲し、
 その結果を返す。 
 | 
getDelegates, getHandleMethod, qualifiesAsHandler, saveBoundClassAndMethodToRequestScopepublic HttpMethodBinding(java.lang.Object delegate)
delegate - ディスパッチの対象となるオブジェクトprotected java.lang.reflect.Method getMethodBoundTo(HttpRequest req, ExecutionContext ctx)
 本クラスの実装では、コンストラクタで渡されたオブジェクトに対して、
 HTTPリクエストのメソッド名とリクエストURIの値から
 実行対象のメソッドを動的に決定して処理を委譲する。
 委譲対象となるメソッドは、以下2つの条件に合致するものが選ばれる。
   1. メソッドの戻り値の型がHttpResponseかつ、引数を2つもち、
      それぞれの型がHttpRequest、ExecutionContextであること。
   2. メソッドの名前が次の文字列に一致する。
      (リクエストのHTTPメソッド名 もしくは "do") + (リクエストURIのリソース名)
      ただし、一致判定は以下の条件のもとで行われる。
        - メソッド名の大文字小文字は区別しない。   
        - リクエストURIのリソース名に含まれる"."は無視される。
        - 委譲先クラスのメソッド名に含まれる"_"は無視される。
 例:
 =====================  ===========================================================
    HTTPリクエスト         委譲対象となるメソッドシグニチャの例
 =====================  ===========================================================
 GET /app/index.html    HttpResponse getIndexHtml(HttpRequest, ExecutionContext);
                        HttpResponse getIndexhtml(HttpRequest, ExecutionContext);
                        HttpResponse get_index_html(HttpRequest, ExecutionContext);
                        HttpResponse do_index_html(HttpRequest, ExecutionContext);
                        HttpResponse doIndexHtml(HttpRequest, ExecutionContext);
 ---------------------  -----------------------------------------------------------
 POST /app/message      HttpResponse postMessage(HttpRequest, ExecutionContext);
                        HttpResponse do_message (HttpRequest, ExecutionContext);
 =====================  ===========================================================
 上記条件に該当するメソッドが存在しなかった場合、
 下記のHTTPメッセージに相当するHttpResponseオブジェクトを返す。
    HTTP/1.1 404 Not Found
    Content-Type: text/plain
    Not Found: /foo/bar/dynamic_page.jsp
 getMethodBoundTo in class MethodBinding<HttpRequest,HttpResponse>req - HTTPリクエストctx - 実行コンテキストpublic HttpResponse handle(HttpRequest req, ExecutionContext ctx)
MethodBindinghandle in interface Handler<HttpRequest,HttpResponse>handle in interface HttpRequestHandlerhandle in class MethodBinding<HttpRequest,HttpResponse>req - 入力オブジェクトctx - 実行コンテキスト