Each of these interfaces is a locality-constrained object. Any attempt to pass a reference outside its locality (that is, its process), or any attempt to externalize an object supporting this interface using the CORBA ORB
object_to_string operation, results in the CORBA
MARSHAL system exception (
CORBA::MARSHAL) being raised.
The Interceptors::Interceptor interface is defined as the base interface of all types of interceptors, including request-level interceptors. This interface contains the set of operations and attributes that are supported by all types of interceptors. The
Interceptors::Interceptor interface is defined as an abstract interface; thus an instance of the interface cannot be instantiated.
The implementation of the operations _duplicate,
_narrow, and
_nil are inherited from the implementation of the
CORBA::LocalBase interface provided by the CORBA ORB in the Oracle Tuxedo product.
The id accessor operation is used by the ORB to obtain the vendor assigned identity of the interceptor as a string value. This attribute is used primarily for debugging and tracing of operations on the interceptors called by the ORB.
A ShutdownReason value that indicates the reason why the interceptor is being shut down. The following
ShutdownReason values can be passed to the operation:
A reference to an ExceptionValue in which the operation is to store any exception raised. This parameter is valid only if a value of
SHUTDOWN_EXCEPTION is returned from the operation.
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.
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.
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.
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);
};
The lowest order bit of response_flags
is set to 1
if a reply message is expected for this request. If the operation is not defined as
oneway, and the request is not invoked via the DII with the
INV_NO_RESPONSE flag set,
response_flags will be set to
\x03.
When this flag is set to \x01 for a
oneway operation, receipt of a reply does not imply that the operation has necessarily completed.
|
|
|
The object_key field from the transport-specific GIOP profile (for example, from the encapsulated IIOP profile of the IOR for the target object). This value is meaningful only to the server and is not interpreted or modified by the client.
|
|
|
|
The full IOR of the target object. The selected_profile_index indicates the transport-specific GIOP profile that was selected by the client ORB.
|
The RequestContext data object contains the information that represents the context in which a request is to be processed. The context information contained in the
RequestContext provides information necessary to coordinate between the processing of a given request and its corresponding reply.
The context information in the RequestContext structure cannot be modified by the interceptor implementation. The ORB maintains ownership of the
RequestContext and is responsible for freeing any resources associated with the
RequestContext when it has completed using it.
|
|
|
|
|
|
|
|
|
|
|
Indicates that the body contains an object reference. The usage is similar to LOCATION_FORWARD, but when used by a server, this value also provides an indication to the client that the client may replace the old IOR with the new IOR. Both the old IOR and the new IOR are valid, but the new IOR is preferred for future use. This resending is transparent to the client program making the request, but the resending is not transparent to the interceptor.
|
|
Indicates that the body contains a GIOP::AddressingDisposition. The client ORB is responsible for resending the original request using the requested addressing mode. This resending is transparent to the client program making the request, but the resending is not transparent to the interceptor.
|
The ReplyContext data object contains the information that represents the context in which a reply is to be processed. The context information contained in
ReplyContext provides information necessary to coordinate between the processing of a given request and its corresponding reply.
The context information in ReplyContext cannot be modified by the interceptor implementation. The ORB maintains ownership of
ReplyContext and is responsible for freeing any resources associated with
ReplyContext when it has completed using it.
A reference to a ReplyContext that contains information about the context in which the reply is being performed.
The exception_occurred operation is called on a request-level interceptor implementation in one of three cases:
3.
|
A client deletes a Request object that was used to initiate a deferred synchronous DII. The exception_occurred method is called instead of the client_response or target_response method of that interceptor. The ORB calls the exception_occurred method to allow the interceptor implementation to clean up any state that it might have been managing that is specific to a request.
|
The implementation of the operations _duplicate,
_narrow, and
_nil are inherited indirectly from the implementation of the
CORBA::LocalBase interface provided by the CORBA ORB in the Oracle Tuxedo product.
A pointer to a ServiceContextList containing service context information to be sent as part of the request to the target object.
Note: In Oracle Tuxedo 8.0, the value of this parameter is always a nil object.
A pointer to a DataInputStream that can be used by the interceptor implementation to retrieve the value of the parameter of the operation.
The DataInputStream contains all
in and
inout parameters, in the order in which they are specified in the operation’s IDL definition, from left to right. A nil
DataInputStream indicates that no arguments exist.
A pointer to a CORBA::DataOutputStream that can be used to populate the parameters to be returned to the initiator of the invocation as a reply. The use of this parameter is only valid if a status of
REPLY_NO_EXCEPTION is returned.
Note: In Oracle Tuxedo 8.0, the value of this parameter is always a nil object.
The client_invoke operation is called on an interceptor implementation that supports the
RequestLevelInterceptor::ClientRequestInterceptor interceptor interface. The operation is called by the ORB anytime that an invocation is being sent to a target object, regardless of whether the target object is in a different address space or the same address space as the target object.
Note: In Oracle Tuxedo 8.0, an interceptor cannot return this status value.
A reference to a ReplyContext that contains information about the context in which the reply is being performed.
A pointer to a ServiceContextList containing service context information received as a result of processing the request by the target object.
Note: In Oracle Tuxedo 8.0, the value of this parameter is always a nil object.
A pointer to a DataInputStream that can be used by the interceptor implementation to retrieve the value of the reply parameters of the operation.
|
|
LOCATION_FORWARD, LOCATION_FORWARD_PERM, or NEEDS_ADDRESSING_MODE
|
A nil DataInputStream is supplied.
|
|
The DataInputStream contains first any operation return value, then any inout and out parameters in the order in which they appear in the operation's IDL definition, from left to right. A nil DataInputStream indicates that no arguments exist.
|
USER_EXCEPTION or SYSTEM_EXCEPTION
|
The DataInputStream contains the exception that was raised by the operation.
|
Note: Exceptions contain a string followed by any exception members. The string contains the repository ID for the exception. The exception members are passed in the same manner as a struct. A system exception contains two unsigned long members, a minor code, and a completion status.
The client_response operation is called on an interceptor implementation that supports the
RequestLevelInterceptor::ClientRequestInterceptor interface. The operation is called by the ORB anytime that a reply to an invocation is being received by the initiator of the request, regardless of whether the initiator is in a different address space or the same address space as the target object.
The implementation of the operations _duplicate,
_narrow, and
_nil are inherited indirectly from the implementation of the
CORBA::LocalBase interface provided by the CORBA ORB in the Oracle Tuxedo product.
A reference to a RequestContext that contains information about the context in which the request is being performed.
A pointer to a ServiceContextList containing service context information received as part of the request to the target object.
A pointer to a DataInputStream that can be used by the interceptor implementation to retrieve the value of the parameter of the operation.
The DataInputStream contains all
in and
inout parameters, in the order in which they are specified in the operation’s IDL definition, from left to right. A nil
DataInputStream indicates that no arguments exist.
A pointer to a DataOutputStream that can be used to populate the parameters to be returned to the initiator of the invocation as a reply. The use of this parameter is only valid if a status of
REPLY_NO_EXCEPTION is returned.
The target_invoke operation is called on an interceptor implementation that supports the
RequestLevelInterceptor::TargetRequestInterceptor interface. The operation is called by the ORB anytime that an invocation is being received by a target object, regardless of whether the target object is in a different address space or the same address space as the target object.
Note: In Oracle Tuxedo 8.0, an interceptor cannot return this status value.
A reference to a ReplyContext that contains information about the context in which the reply is being performed.
A pointer to a ServiceContextList containing service context information to be sent as a result of processing the request by the target object.
Note: In Oracle Tuxedo 8.0, the value of this parameter is always a nil object.
A pointer to a DataInputStream that can be used by the interceptor implementation to retrieve the value of the reply parameters of the operation.
|
|
LOCATION_FORWARD, LOCATION_FORWARD_PERM, or NEEDS_ADDRESSING_MODE
|
A nil DataInputStream is supplied
|
|
The DataInputStream contains first any operation return value, then any inout and out parameters in the order in which they appear in the operation's IDL definition, from left to right. A nil DataInputStream indicates that no arguments exist.
|
USER_EXCEPTION or SYSTEM_EXCEPTION
|
The DataInputStream contains the exception that was raised by the operation.
|
Note: Exceptions contain a string followed by any exception members. The string contains the repository ID for the exception. The exception members are passed in the same manner as a
struct. A system exception contains two unsigned long members, a minor code, and a completion status.
The target_response operation is called on an interceptor implementation that supports the
RequestLevelInterceptor::TargetRequestInterceptor interface. The operation is called by the target-side ORB anytime that a reply to an invocation is being sent to the initiator of the request, regardless of whether the initiator is in a different address space or the same address space as the target object.
Indicates that the interceptor encountered an error. The parameter excep_val is used to report the exception to the ORB. Any interceptors not yet called on the way back to the client have their
exception_occurred operation called by the ORB in order to notify them that processing the request has failed. Note that the ORB is responsible for the memory management for the
excep_val parameter.
The AppRequestInterceptorInit function is a user-provided function that is used by the ORB to instantiate and initialize client-side and target-side interceptors.
The abstract valuetype keywords in IDL applied to
DataInputStream indicates that it is not the same as an interface.
module CORBA {
//... all the rest
// Definitions used by DataInputStream
typedef sequence<any> AnySeq;
typedef sequence<boolean> BooleanSeq;
typedef sequence<char> CharSeq;
typedef sequence<octet> OctetSeq;
typedef sequence<short> ShortSeq;
typedef sequence<unsigned short> UShortSeq;
typedef sequence<long> LongSeq;
typedef sequence<unsigned long> ULongSeq;
typedef sequence<float> FloatSeq;
typedef sequence<double> DoubleSeq;
// DataInputStream - for reading data from the stream
abstract valuetype DataInputStream
{
any read_any(); // Raises NO_IMPLEMENT
boolean read_boolean();
char read_char();
octet read_octet();
short read_short();
unsigned short read_ushort();
long read_long();
unsigned long read_ulong();
float read_float();
double read_double();
string read_string ();
Object read_Object();
TypeCode read_TypeCode();
void read_any_array( inout AnySeq seq,
in unsigned long offset,
in unsigned long length);
// Raises NO_IMPLEMENT
void read_boolean_array(inout BooleanSeq seq,
in unsigned long offset,
in unsigned long length);
void read_char_array( inout CharSeq seq,
in unsigned long offset,
in unsigned long length);
void read_octet_array(inout OctetSeq seq,
in unsigned long offset,
in unsigned long length);
void read_short_array(inout ShortSeq seq,
in unsigned long offset,
in unsigned long length);
void read_ushort_array(inout UShortSeq seq,
in unsigned long offset,
in unsigned long length);
void read_long_array( inout LongSeq seq,
in unsigned long offset,
in unsigned long length);
void read_ulong_array(inout ULongSeq seq,
in unsigned long offset,
in unsigned long length);
void read_float_array(inout FloatSeq seq,
in unsigned long offset,
in unsigned long length);
void read_double_array(inout DoubleSeq seq,
in unsigned long offset,
in unsigned long length);
};
};
The implementation of CORBA::DataInputStream inherits from
CORBA::ValueBase rather than from
CORBA::Object. You cannot use, for example,
_duplicate,
_narrow, and
_nil operations since they apply only to
CORBA::Object. At this time, there is nothing of interest for users in the
CORBA::ValueBase interface.
class CORBA
{
public:
class AnySeq {/* Normal sequence definition */};
typedef AnySeq * AnySeq_ptr;
class BooleanSeq {/* Normal sequence definition */};
typedef BooleanSeq * BooleanSeq_ptr;
static const CORBA::TypeCode_ptr _tc_BooleanSeq;
class CharSeq {/* Normal sequence definition */};
typedef CharSeq * CharSeq_ptr;
static const CORBA::TypeCode_ptr _tc_CharSeq;
class OctetSeq {/* Normal sequence definition */};
typedef OctetSeq * OctetSeq_ptr;
static const CORBA::TypeCode_ptr _tc_OctetSeq;
class ShortSeq {/* Normal sequence definition */};
typedef ShortSeq * ShortSeq_ptr;
static const CORBA::TypeCode_ptr _tc_ShortSeq;
class UshortSeq {/* Normal sequence definition */};
typedef UShortSeq * UShortSeq_ptr;
static const CORBA::TypeCode_ptr _tc_UShortSeq;
class LongSeq {/* Normal sequence definition */};
typedef LongSeq * LongSeq_ptr;
static const CORBA::TypeCode_ptr _tc_LongSeq;
class UlongSeq {/* Normal sequence definition */};
typedef ULongSeq * ULongSeq_ptr;
static const CORBA::TypeCode_ptr _tc_ULongSeq;
class FloatSeq {/* Normal sequence definition */};
typedef FloatSeq * FloatSeq_ptr;
static const CORBA::TypeCode_ptr _tc_FloatSeq;
class DoubleSeq {/* Normal sequence definition */};
typedef DoubleSeq * DoubleSeq_ptr;
static const CORBA::TypeCode_ptr _tc_DoubleSeq;
class OBBEXPDLL DataInputStream : public virtual ValueBase
{
public:
static DataInputStream_ptr _downcast(ValueBase_ptr obj);
virtual Any * read_any (); // Raises NO_IMPLEMENT
virtual Boolean read_boolean ();
virtual Char read_char ();
virtual Octet read_octet ();
virtual Short read_short ();
virtual UShort read_ushort ();
virtual Long read_long ();
virtual ULong read_ulong ();
virtual Float read_float ();
virtual Double read_double ();
virtual Char * read_string ();
virtual Object_ptr read_Object ();
virtual TypeCode_ptr read_TypeCode ();
virtual void read_any_array ( AnySeq & seq,
ULong offset, ULong length);
// Raises NO_IMPLEMENT
virtual void read_boolean_array(BooleanSeq & seq,
ULong offset, ULong length);
virtual void read_char_array ( CharSeq & seq,
ULong offset, ULong length);
virtual void read_octet_array ( OctetSeq & seq,
ULong offset, ULong length);
virtual void read_short_array ( ShortSeq & seq,
ULong offset, ULong length);
virtual void read_ushort_array (UShortSeq & seq,
ULong offset, ULong length);
virtual void read_long_array ( LongSeq & seq,
ULong offset, ULong length);
virtual void read_ulong_array ( ULongSeq & seq,
ULong offset, ULong length);
virtual void read_float_array ( FloatSeq & seq,
ULong offset, ULong length);
virtual void read_double_array (DoubleSeq & seq,
ULong offset, ULong length);
protected:
DataInputStream(){ };
virtual ~DataInputStream(){ }
private:
void operator=(const DataInputStream&) { }
};
typedef DataInputStream * DataInputStream_ptr;
};
Note:
|
String_var, TypeCode_var, or Object_var can be used for memory management. Otherwise, strings must be released using the string_free() operation on the CORBA object, and TypeCode or Object pointers must be released using the release() operation on the CORBA object.
|
AnySeq (Not implemented)
BooleanSeq
CharSeq
OctetSeq
ShortSeq
UshortSeq
LongSeq
UlongSeq
FloatSeq
DoubleSeq
void read_array_<primitive>(
<primitive>Seq & seq,
ULong offset,
ULong length);
AnySeq (Not implemented)
BooleanSeq
CharSeq
OctetSeq
ShortSeq
UshortSeq
LongSeq
UlongSeq
FloatSeq
DoubleSeq