![]() |
![]() |
e-docs > Tuxedo > Using CORBA Request-Level Interceptors > Request-Level Interceptor API |
Using CORBA Request-Level Interceptors
|
Synopsis
Notifies an implementation of an interceptor that the interceptor is being shut down.
C++ Binding
virtual ShutdownReturnStatus
shutdown( ShutdownReason reason,
CORBA::Exception_ptr & excep_val) = 0;
Parameters
Exceptions
None.
Description
The shutdown operation is used by the ORB to notify an implementation of an interceptor that the interceptor is being shut down. The ORB destroys the instance of the interceptor once control is returned from the operation back to the ORB.
Return Values
RequestLevelInterceptor::
RequestInterceptor Interface
The RequestLevelInterceptor::RequestInterceptor interface is the base interface of all request-level interceptors. It inherits directly from the Interceptors::Interceptor interface. The RequestLevelInterceptor::RequestInterceptor interface:
The local keyword in OMG IDL indicates that the RequestInterceptor interface is not a normal CORBA object, so it cannot be used as such.
Listing 8-3 OMG IDL for the RequestLevelInterceptor::RequestInterceptor Interface
#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 */
The implementation of the RequestInterceptor interface inherits from CORBA::LocalBase rather than from CORBA::Object. CORBA::LocalBase provides an implementation of the operations _duplicate, _narrow, and _nil, similar to those of CORBA::Object.
Listing 8-4 C++ Declaration for the RequestInterceptor Interface
#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&) { }
}; // class RequestInterceptor
#endif /* _RequestLevelInterceptor_h */
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |