bea ホーム | 製品 | dev2dev | support | askBEA |
![]() |
![]() |
|
![]() |
e-docs > Tuxedo > Tuxedo CORBA 要求レベルのインターセプタ > 要求レベルのインターセプタの API |
Tuxedo CORBA 要求レベルのインターセプタ
|
概要
インターセプタのインプリメンテーションに、インターセプタがシャットダウンされていることを通知します。
C++ バインディング
virtual ShutdownReturnStatus
shutdown( ShutdownReason reason,
CORBA::Exception_ptr & excep_val) = 0;
パラメータ
例外
特にありません。
説明
shutdown オペレーションは、インターセプタのインプリメンテーションに、インターセプタがシャットダウンされていることを通知するために、ORB によって使用されます。ORB は、オペレーションから ORB に制御が返されると、インターセプタのインスタンスを破棄します。
戻り値
RequestLevelInterceptor::
RequestInterceptor インターフェイス
RequestLevelInterceptor::RequestInterceptor インターフェイスは、すべての要求レベルのインターセプタの基本インターフェイスです。これは Interceptors::Interceptor インターフェイスから直接継承されます。RequestLevelInterceptor::RequestInterceptor インターフェイスの特長は次のとおりです。
OMG IDL による local キーワードは、RequestInterceptor インターフェイスが通常の CORBA オブジェクトではなく、したがってそのようには使用できないことを示します。
コード リスト 8-3 RequestLevelInterceptor::RequestInterceptor インターフェイスの OMG IDL
#ifndef _REQUEST_LEVEL_INTERCEPTOR_IDL
#define _REQUEST_LEVEL_INTERCEPTOR_IDL
#include <orb.idl>
#include <Giop.idl>
#include <Interceptors.idl>
#pragma prefix “beasys.com”
module RequestLevelInterceptor
{
local RequestInterceptor : Interceptors::Interceptor
{
void exception_occurred(
in ReplyContext reply_context,
in ExceptionValue excep_val
);
};
};
#endif /* _REQUEST_LEVEL_INTERCEPTOR_IDL */
RequestInterceptor インターフェイスのインプリメンテーションは、CORBA::Object ではなく、CORBA::LocalBase から継承されます。CORBA::LocalBase は、CORBA::Object の場合と同様に、オペレーション _duplicate、_narrow、および _nil のインプリメンテーションを提供します。
コード リスト 8-4 RequestInterceptor インターフェイスの C++ 宣言
#ifndef _RequestLevelInterceptor_h
#define _RequestLevelInterceptor_h
#include <CORBA.h>
#include <IOP.h>
#include <GIOP.h>
#include <Interceptors.h>
class OBBEXPDLL RequestLevelInterceptor
{
public:
class RequestInterceptor;
typedef RequestInterceptor * RequestInterceptor_ptr;
struct RequestContext
{
Interceptors::Version struct_version;
CORBA::ULong request_id;
CORBA::Octet response_flags;
GIOP::TargetAddress target;
CORBA::String_var interface_id;
CORBA::String_var operation;
RequestContext &operator=(const RequestContext obj);
};
typedef RequestContext * RequestContext_ptr;
typedef GIOP::ReplyStatusType_1_2 ReplyStatus;
struct ReplyContext
{
Interceptors::Version struct_version;
CORBA::ULong request_id;
ReplyStatus reply_status;
};
typedef ReplyContext * ReplyContext_ptr;
class OBBEXPDLL RequestInterceptor :
public virtual Interceptors::Interceptor
{
public:
static RequestInterceptor_ptr
_duplicate(RequestInterceptor_ptr obj);
static RequestInterceptor_ptr
_narrow(RequestInterceptor_ptr obj);
inline static RequestInterceptor_ptr _nil() { return 0; }
virtual void
exception_occurred( const ReplyContext & reply_context,
CORBA::Exception_ptr excep_val) = 0;
protected:
RequestInterceptor(CORBA::LocalBase_ptr obj = 0) { }
virtual ~RequestInterceptor(){ }
private:
RequestInterceptor( const RequestInterceptor&) { }
void operator=(const RequestInterceptor&) { }
}; //クラス RequestInterceptor
#endif /* _RequestLevelInterceptor_h */
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |