27.21.2 ServerRequestInterceptorのメソッド
-
virtual void receive_request_service_contexts(
ServerRequestInfo_ptr _ri) = 0;
このインタセプトポイントでは,インタセプタは受信したリクエストからサービスコンテキスト情報を取得し,PortableInterceptor::Currentのスロットに転送する必要があります。
このインタセプトポイントは,サーバントマネージャよりも先に呼び出されます。オペレーションのパラメタはまだこの時点では使用できません。このインタセプトポイントは,ターゲットオペレーションの呼び出しと同じスレッドで実行される場合も,実行されない場合もあります。
このインタセプトポイントでは,システム例外が発生する場合があります。システム例外が発生した場合,ほかのインタセプタのreceive_request_service_contexts()インタセプトポイントは呼び出されません。フロースタックからインタセプタが取り出され,そのインタセプタのsend_exception()インタセプトポイントが呼び出されます。
このインタセプトポイントでは,ForwardRequest例外を発生させることができます。インタセプトでこの例外が発生した場合,ほかのインタセプタのreceive_request_service_contexts()メソッドは呼び出されません。フロースタックからインタセプタが取り出され,そのインタセプタのsend_otherインタセプトポイントが呼び出されます。ForwardRequest例外については,「27.9 ForwardRequest」を参照してください。
-
_ri
インタセプタが使用するServerRequestInfoインスタンス
-
-
ServerRequestInfo_ptr _ri) = 0;
このインタセプトポイントを使用すると,メソッドのパラメタを含むすべての情報が使用できる状態になったあとで,リクエスト情報をインタセプタで照会できます。このインタセプトポイントは,ターゲットオペレーションの呼び出しと同じスレッドで実行されます。
DSIモデルでは,ユーザコードがarguments()を呼び出したときに最初にパラメタが使用できるようになるため,arguments()の内側からreceive_request()が呼び出されます。DSIモデルでは,arguments()を呼び出さないようにすることもできます。
ターゲットオペレーションはarguments()より先にset_exception()を呼び出すことがあります。ORBは,arguments()とset_exception()のどちらが呼び出されても,receive_request()は1回だけ呼び出されることを保障します。
set_exception()でreceive_request()が呼び出された場合,arguments()のリクエストは,標準マイナーコード1のNO_RESOURCES例外となります。
このインタセプトポイントでは,システム例外が発生する場合があります。システム例外が発生した場合,ほかのインタセプタのreceive_request()メソッドは呼び出されません。フロースタックからインタセプタが取り出され,そのインタセプタのsend_exception()インタセプトポイントが呼び出されます。
このインタセプトポイントでは,ForwardRequest例外を発生させることができます。インタセプトでこの例外が発生した場合,ほかのインタセプタのreceive_request()メソッドは呼び出されません。フロースタックからインタセプタが取り出され,そのインタセプタのsend_otherインタセプトポイントが呼び出されます。ForwardRequest例外については,「27.9 ForwardRequest」を参照してください。
-
_ri
インタセプタが使用するServerRequestInfoインスタンス
-
-
ServerRequestInfo_ptr _ri) = 0;
このインタセプトポイントを使用すると,ターゲットオペレーションが呼び出されてから応答がクライアントに返されるまでの間に,インタセプタで応答情報の照会と応答サービスコンテキストの修正ができます。このインタセプトポイントは,ターゲットオペレーションと同じスレッドで実行されます。
このインタセプトポイントでは,システム例外が発生する場合があります。システム例外が発生した場合,ほかのインタセプタのsend_reply()インタセプトポイントは呼び出されません。フロースタックにあるインタセプタのsend_exception()インタセプトポイントが呼び出されます。
-
_ri
インタセプタが使用するServerRequestInfoインスタンス
-
-
ServerRequestInfo_ptr _ri) = 0;
このインタセプトポイントは,例外が発生したときに呼び出されます。このインタセプトポイントを使用すると,例外がクライアントに通知される前にインタセプタでリクエスト情報の照会と応答サーバコンテキストの修正ができます。このインタセプトポイントは,ターゲットオペレーションと同じスレッドで実行されます。このインタセプトポイントでは,システム例外が発生する場合があります。システム例外が発生した場合は,フロースタックから取り出された一連のインタセプタがsend_exception()呼び出し時に受け取る例外が変更されます。クライアントに通知される例外は,インタセプタが通知する最後の例外です。ほかのインタセプタが例外を変更しなければ,元の例外が通知されます。
このインタセプトポイントでは,ForwardRequest例外を発生させることができます。インタセプタがこの例外を出力した場合,ほかのインタセプタのsend_exception()インタセプトポイントは呼び出されません。フロースタックにあるインタセプタのsend_otherインタセプトポイントが呼び出されます。ForwardRequest例外については,「27.9 ForwardRequest」を参照してください。
-
_ri
インタセプタが使用するServerRequestInfoインスタンス
-
-
ServerRequestInfo_ptr _ri) = 0;
このインタセプトポイントを使用すると,リクエストの結果が正常な応答でも例外でもない場合に使用できる情報をインタセプタで照会できます。例えば,リクエストがリトライになる場合(例えば,LOCATION_FORWARD状態でGIOP Replyを受信した場合)などです。このインタセプトポイントは,ターゲットオペレーションと同じスレッドで実行されます。
このインタセプトポイントでは,システム例外が発生する場合があります。システム例外が発生した場合,ほかのインタセプタのsend_other()メソッドは呼び出されません。フロースタックにあるインタセプタのsend_exception()インタセプトポイントが呼び出されます。
このインタセプトポイントでは,ForwardRequest例外を発生させることができます。インタセプタがこの例外を出力した場合,ForwardRequest例外が提供する新しい情報で一連のインタセプタのsend_other()メソッドが呼び出されます。ForwardRequest例外については,「27.9 ForwardRequest」を参照してください。
-
_ri
インタセプタが使用するServerRequestInfoインスタンス
-