bea ホーム | 製品 | dev2dev | support | askBEA
BEA Logo Tuxedo
 ドキュメントのダウンロード   サイトマップ   用語集 
検索
0

Tuxedo CORBA 要求レベルのインターセプタ

 Previous Next Contents Index View as PDF  

Interceptor::shutdown

概要

インターセプタのインプリメンテーションに、インターセプタがシャットダウンされていることを通知します。

C++ バインディング

virtual ShutdownReturnStatus 
shutdown( ShutdownReason reason,
CORBA::Exception_ptr & excep_val) = 0;

パラメータ

reason

インターセプタがシャットダウンされている理由を示す ShutdownReason 値です。次の ShutdownReason 値を、オペレーションに渡すことができます。


 


 


 


 


 

excep_val

ExceptionValue へのリファレンスです。発生した例外はすべて、オペレーションによってこのパラメータに格納されます。このパラメータは、オペレーションから SHUTDOWN_EXCEPTION の値が返された場合のみ有効です。

ExceptionValue は、クラス CORBA::Exception にマッピングされます。

例外

特にありません。

説明

shutdown オペレーションは、インターセプタのインプリメンテーションに、インターセプタがシャットダウンされていることを通知するために、ORB によって使用されます。ORB は、オペレーションから ORB に制御が返されると、インターセプタのインスタンスを破棄します。

戻り値

SHUTDOWN_NO_EXCEPTION

オペレーションが例外を発生していないことを示します。

SHUTDOWN_EXCEPTION

オペレーションが例外を発生していることを示します。例外の値は、excep_val パラメータに格納されます。

 


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 */

 

Back to Top Previous Next
Contact e-docsContact BEAwebmasterprivacy