NVList
PIDL represented by ParameterList
IDL.
* This exists in order to keep the Portable Interceptor IDL from becoming
* PIDL.
*/
struct Parameter {
any argument;
CORBA::ParameterMode mode;
};
/**
* NVList
PIDL represented by ParameterList
IDL.
* This exists in order to keep the Portable Interceptor IDL from becoming
* PIDL.
*/
typedef sequenceContextList
PIDL represented by ContextList
* IDL. This exists in order to keep the Portable Interceptor IDL from
* becoming PIDL.
*/
typedef CORBA::StringSeq ContextList;
/**
* ExceptionList
PIDL represented by ExceptionList
* IDL. This exists in order to keep the Portable Interceptor IDL from
* becoming PIDL.
*/
typedef sequenceContext
PIDL represented by RequestContext
* IDL. This exists in order to keep the Portable Interceptor IDL from o
* becoming PIDL.
*
* Context
objects are encoded as String[]
. The
* Strings
occur in pairs. The first String
in
* each pair is the context property name and the second String
* in each pair is the associated value.
*/
typedef CORBA::StringSeq RequestContext;
};
module PortableInterceptor {
/**
* All Portable Interceptors implement Interceptor.
*/
local interface Interceptor {
/**
* Returns the name of the interceptor.
*
* Each Interceptor may have a name that may be used administratively
* to order the lists of Interceptors. Only one Interceptor of a given
* name can be registered with the ORB for each Interceptor type. An
* Interceptor may be anonymous, i.e., have an empty string as the name
* attribute. Any number of anonymous Interceptors may be registered with
* the ORB.
*
* @return the name of the interceptor.
*/
readonly attribute string name;
// Added in ptc/00-08-06
/**
* Provides an opportunity to destroy this interceptor.
* The destroy method is called during ORB.destroy
. When an
* application calls ORB.destroy
, the ORB:
*
Interceptor.destroy
operation for each
* interceptorInterceptor.destroy
on
* object references for objects implemented on the ORB being destroyed
* result in undefined behavior. However, method invocations on objects
* implemented on an ORB other than the one being destroyed are
* permitted. (This means that the ORB being destroyed is still capable
* of acting as a client, but not as a server.)
*/
void destroy();
};
/**
* The ForwardRequest
exception is the means by which an
* Interceptor can indicate to the ORB that a retry of the request should
* occur with the new object given in the exception. This behavior of
* causing a retry only occurs if the ORB receives a ForwardRequest from
* an interceptor. If ForwardRequest
is thrown anywhere else
* it is passed through the ORB as is normal for a user exception.
*
* If an Interceptor throws a ForwardRequest
exception in
* response to a call of an interceptor, no other Interceptors are called
* for that interception point. The remaining Interceptors in the Flow Stack
* shall have their appropriate ending interception point called:
* receive_other
on the client, or send_other
on
* the server. The reply_status
in the
* receive_other
or send_other
would be
* LOCATION_FORWARD
.
*/
exception ForwardRequest {
/**
* The new object to forward the request to.
*/
Object forward;
// Change in ptc/00-08-06
// boolean permanent;
};
/** Reply status, represented as an int */
typedef short ReplyStatus;
// Valid reply_status values:
/**
* Indicates a successful Reply Status. One possible value for
* RequestInfo.reply_status
.
* @see RequestInfo#reply_status
* @see SYSTEM_EXCEPTION
* @see USER_EXCEPTION
* @see LOCATION_FORWARD
* @see TRANSPORT_RETRY
*/
const ReplyStatus SUCCESSFUL = 0;
/**
* Indicates a SystemException reply status. One possible value for
* RequestInfo.reply_status
.
* @see RequestInfo#reply_status
* @see SUCCESSFUL
* @see USER_EXCEPTION
* @see LOCATION_FORWARD
* @see TRANSPORT_RETRY
*/
const ReplyStatus SYSTEM_EXCEPTION = 1;
/**
* Indicates a UserException reply status. One possible value for
* RequestInfo.reply_status
.
* @see RequestInfo#reply_status
* @see SUCCESSFUL
* @see SYSTEM_EXCEPTION
* @see LOCATION_FORWARD
* @see TRANSPORT_RETRY
*/
const ReplyStatus USER_EXCEPTION = 2;
/**
* Indicates a LocationForward reply status. One possible value for
* RequestInfo.reply_status
.
* @see RequestInfo#reply_status
* @see SUCCESSFUL
* @see SYSTEM_EXCEPTION
* @see USER_EXCEPTION
* @see TRANSPORT_RETRY
*/
const ReplyStatus LOCATION_FORWARD = 3;
// Changes in ptc/00-08-06
// const ReplyStatus LOCATION_FORWARD_PERMANENT = 4;
/**
* Indicates a Transport Retry reply status. One possible value for
* RequestInfo.reply_status
.
* @see RequestInfo#reply_status
* @see SUCCESSFUL
* @see SYSTEM_EXCEPTION
* @see USER_EXCEPTION
* @see LOCATION_FORWARD
*/
const ReplyStatus TRANSPORT_RETRY = 4;
/**
* XXX
*/
const ReplyStatus UNKNOWN = 5;
/** Slot id, represented as an int */
typedef unsigned long SlotId;
/**
* This exception is thrown when get_slot
or
* set_slot
is called on a slot that has not been allocated.
*/
exception InvalidSlot {};
/**
* Portable Interceptors Current (also known as PICurrent
)
* is merely a slot table, the slots of which are used by each service to
* transfer their context data between their context and the request's or
* reply's service context. Each service which wishes to use PICurrent
* reserves a slot or slots at initialization time and uses those slots
* during the processing of requests and replies.
*
* Before an invocation is made, PICurrent is obtained via a call to
* ORB.resolve_initial_references( "PICurrent" )
. From within
* the interception points, the data on PICurrent that has moved from the
* thread scope to the request scope is available via the
* get_slot
operation on the RequestInfo
object.
* A PICurrent can still be obtained via
* resolve_initial_references
, but that is the Interceptor's
* thread scope PICurrent.
*/
local interface Current : CORBA::Current {
/**
* Retrieves the slot data the application set in PICurrent via
* get_slot
. The data is in the form of an Any.
*
* If the given slot has not been set, an Any containing a type code
* with a TCKind
value of tk_null
and no value
* is returned.
*
* @param id The SlotId
of the slot from which the data will
* be returned.
* @return The data, in the form of an Any, of the given slot identifier.
* @exception InvalidSlot thrown if get_slot is called on a slot that
* has not been allocated.
* @exception BAD_INV_ORDER thrown if get_slot
is called
* from within an ORB initializer
*/
any get_slot (in SlotId id) raises (InvalidSlot);
/**
* Sets data in a slot. The data is in the form of an Any. If data
* already exists in that slot, it is overridden.
*
* @param id The SlotId
of the slot to which the data will
* be set.
* @param data The data, in the form of an Any, which will be set
* to the identified slot.
* @exception InvalidSlot thrown if set_slot
is called on
* a slot that has not been allocated.
* @exception BAD_INV_ORDER thrown if set_slot
is called
* from within an ORB initializer.
*/
void set_slot (in SlotId id, in any data) raises (InvalidSlot);
};
/**
* Request Information, accessible to Interceptors.
*
* Each interception point is given an object through which the
* Interceptor can access request information. Client-side and server-side
* interception points are concerned with different information, so there
* are two information objects: ClientRequestInfo
is passed
* to the client-side interception points and ServerRequestInfo
* is passed to the server-side interception points. But there is
* information that is common to both, so they both inherit from a common
* interface: RequestInfo
.
*
* @see ClientRequestInfo
* @see ServerRequestInfo
*/
local interface RequestInfo {
/**
* Returns an id that uniquely identifies an active request/reply
* sequence. Once a request/reply sequence is concluded this ID may be
* reused. Note that this id is not the same as the GIOP
* request_id
. If GIOP is the transport mechanism used,
* then these IDs may very well be the same, but this is not guaranteed
* nor required.
*/
readonly attribute unsigned long request_id;
/**
* Returns the name of the operation being invoked.
*/
readonly attribute string operation;
/**
* Returns an array of Parameter
objects, containing the
* arguments on the operation being invoked. If there are no arguments,
* this attribute will be a zero length array.
*
* Not all environments provide access to the arguments. With the Java
* portable bindings, for example, the arguments are not available.
* In these environments, when this attribute is accessed,
* NO_RESOURCES
will be thrown with a standard minor code
* of 1.
*
* Note: Arguments are available for DSI/DII calls.
*
* @exception NO_RESOURCES thrown if arguments are not available.
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
readonly attribute Dynamic::ParameterList arguments;
/**
* Returns an array of TypeCode
objects describing the
* TypeCode
s of the user exceptions that this operation
* invocation may throw. If there are no user exceptions, this
* will return a zero length array.
*
* Not all environments provide access to the exception list. With
* the Java portable bindings, for example, the exception list is
* not available. In these environments, when this attribute is
* accessed, NO_RESOURCES
will be thrown with a
* standard minor code of 1.
*
* Note: Exceptions are available for DSI/DII calls.
*
* @exception NO_RESOURCES thrown if exceptions are not available.
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
readonly attribute Dynamic::ExceptionList exceptions;
/**
* Returns an array of String
objects describing the
* contexts that may be passed on this operation invocation. If there
* are no contexts, this will return a zero length array.
*
* Not all environments provide access to the context list. With the
* Java portable bindings, for example, the context list is not
* available. In these environments, when this attribute is accessed,
* NO_RESOURCES
will be thrown with a standard minor code
* of 1.
*
* Note: Contexts are available for DSI/DII calls.
*
* @exception NO_RESOURCES thrown if contexts are not available.
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
readonly attribute Dynamic::ContextList contexts;
/**
* Returns an array of String
objects containing the
* contexts being sent on the request.
*
* Not all environments provide access to the context. With the Java * portable bindings, for example, the context is not available. In * these environments, when this attribute is accessed, NO_RESOURCES will * be thrown with standard minor code of 1. *
* Note: operation_context
is available for
* DSI/DII calls.
*
* @exception NO_RESOURCES thrown if operation context is not available.
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
readonly attribute Dynamic::RequestContext operation_context;
/**
* Returns an any containing the result of the operation invocation.
* If the operation return type is void, this attribute will be an any
* containing a type code with a TCKind
value of
* tk_void
and no value.
*
* Not all environments provide access to the result. With the Java
* portable bindings, for example, the result is not available. In
* these environments, when this attribute is accessed,
* NO_RESOURCES
will be thrown with a standard minor code of
* 1.
*
* Note: Result is available for DSI/DII calls.
*
* @exception NO_RESOURCES thrown if result is not available.
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
readonly attribute any result;
/**
* Indicates whether a response is expected.
*
* On the client, a reply is not returned when
* response_expected
is false, so receive_reply
* cannot be called. receive_other
is called unless an
* exception occurs, in which case receive_exception
is
* called.
*
* On the client, within send_poll
, this attribute is true.
*/
readonly attribute boolean response_expected;
/**
* Defines how far the request shall progress before control is returned
* to the client. This is defined in the Messaging specification, and
* is pertinent only when response_expected
is false. If
* response_expected
is true, the value of
* sync_scope
is undefined. This attribute may have one of
* the following values:
*
Messaging.SYNC_NONE
Messaging.SYNC_WITH_TRANSPORT
Messaging.SYNC_WITH_SERVER
Messaging.SYNC_WITH_TARGET
receive_request_service_contexts
,
* receive_request
, send_reply
or
* send_exception
).
*
* For SYNC_WITH_SERVER
and SYNC_WITH_TARGET
,
* the server does send an empty reply back to the client before the
* target is invoked. This reply is not intercepted by server-side
* Interceptors.
*
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
readonly attribute Messaging::SyncScope sync_scope;
/**
* Describes the state of the result of the operation invocation. The
* return value can be one of the following:
*
PortableInterceptor.SUCCESSFUL
PortableInterceptor.SYSTEM_EXCEPTION
PortableInterceptor.USER_EXCEPTION
PortableInterceptor.LOCATION_FORWARD
PortableInterceptor.TRANSPORT_RETRY
receive_reply
interception point, this
* will only return SUCCESSFUL
receive_exception
interception point,
* this will be either SYSTEM_EXCEPTION
or
* USER_EXCEPTION
.receive_other
interception point, this
* will be any of: SUCCESSFUL
,
* LOCATION_FORWARD
, or TRANSPORT_RETRY
.
* SUCCESSFUL
means an asynchronous request returned
* successfully. LOCATION_FORWARD
means that a reply
* came back with LOCATION_FORWARD
as its status.
* TRANSPORT_RETRY
means that the transport
* mechanism indicated a retry - a GIOP reply with a status of
* NEEDS_ADDRESSING_MODE
, for instance. send_reply
interception point, this
* will only be SUCCESSFUL
.send_exception
interception point,
* this will be either SYSTEM_EXCEPTION
or
* USER_EXCEPTION
.send_other
interception point, this
* attribute will be any of: SUCCESSFUL
, or
* LOCATION_FORWARD
. SUCCESSFUL
means
* an asynchronous request returned successfully.
* LOCATION_FORWARD
means that a reply came back
* with LOCATION_FORWARD
as its status.reply_status
attribute is LOCATION_FORWARD
.
* It is indeterminate whether a forwarded request will actually occur.
*/
readonly attribute Object forward_reference;
/**
* Returns the data from the given slot of the
* PortableInterceptor.Current
that is in the scope of
* the request.
*
* If the given slot has not been set, then an any containing a
* type code with a TCKind
value of tk_null
is
* returned.
*
* @param id The SlotId
of the slot which is to be
* returned.
* @return The slot data, in the form of an any, obtained with the
* given identifier.
* @exception InvalidSlot thrown if the ID does not define an
* allocated slot.
* @see Current
*/
any get_slot (in SlotId id) raises (InvalidSlot);
/**
* Returns a copy of the service context with the given ID that
* is associated with the request.
*
* @param id The IOP.ServiceId
of the service context
* which is to be returned.
* @return The IOP.ServiceContext
obtained with the
* given identifier.
* @exception BAD_PARAM thrown with a standard minor code of 26, if the
* request's service context does not contain an entry for that ID.
*/
IOP::ServiceContext get_request_service_context
(in IOP::ServiceId id);
/**
* Returns a copy of the service context with the given ID that
* is associated with the reply.
*
* @param id The IOP.ServiceId
of the service context
* which is to be returned.
* @return The IOP.ServiceContext
obtained with the given
* identifier.
* @exception BAD_PARAM thrown with a standard minor code of 26 if the
* request's service context does not contain an entry for that ID.
*/
IOP::ServiceContext get_reply_service_context
(in IOP::ServiceId id);
};
/**
* Request Information, accessible to client-side request interceptors.
*
* Some attributes and operations on ClientRequestInfo
are
* not valid at all interception points. The following table shows the
* validity of each attribute or operation. If it is not valid, attempting
* to access it will result in a BAD_INV_ORDER
being thrown
* with a standard minor code of 14.
*
* *
* | send_request | *send_poll | *receive_reply | *receive_exception | *receive_other | *
---|---|---|---|---|---|
Inherited from RequestInfo: | *|||||
request_id |
* yes | *yes | *yes | *yes | *yes |
operation |
* yes | *yes | *yes | *yes | *yes |
arguments |
* yes1 | *no | *yes | *no | *no |
exceptions |
* yes | *no | *yes | *yes | *yes |
contexts |
* yes | *no | *yes | *yes | *yes |
operation_context |
* yes | *no | *yes | *yes | *yes | *
result |
* no | *no | *yes | *no | *no | *
response_expected |
* yes | *yes | *yes | *yes | *yes |
sync_scope |
* yes | *no | *yes | *yes | *yes | *
reply_status |
* no | *no | *yes | *yes | *yes |
forward_reference |
* no | *no | *no | *no | *yes2 * |
get_slot |
* yes | *yes | *yes | *yes | *yes |
get_request_service_context |
* yes | *no | *yes | *yes | *yes |
get_reply_service_context |
* no | *no | *yes | *yes | *yes | *
ClientRequestInfo-specific: | *|||||
target |
* yes | *yes | *yes | *yes | *yes |
effective_target |
* yes | *yes | *yes | *yes | *yes | *
effective_profile |
* yes | *yes | *yes | *yes | *yes |
received_exception |
* no | *no | *no | *yes | *no |
received_exception_id |
* no | *no | *no | *yes | *no |
get_effective_component |
* yes | *no | *yes | *yes | *yes |
get_effective_components |
* yes | *no | *yes | *yes | *yes |
get_request_policy |
* yes | *no | *yes | *yes | *yes |
add_request_service_context |
* yes | *no | *no | *no | *no |
ClientRequestInfo
is passed to
* send_request
, there is an entry in the list for every
* argument, whether in, inout, or out. But only the in and inout
* arguments will be available.reply_status
atribute is not
* LOCATION_FORWARD
, accessing this attribute will
* throw BAD_INV_ORDER
with a standard minor code of
* 14.reply_status
is LOCATION_FORWARD
,
* then on subsequent requests, effective_target
will
* contain the forwarded IOR while target will remain unchanged.
*
* @see #target
*/
readonly attribute Object effective_target;
/**
* Returns the profile that will be used to send the request. If a
* location forward has occurred for this operation's object and
* that object's profile changed accordingly, then this profile will
* be that located profile.
*/
readonly attribute IOP::TaggedProfile effective_profile;
/**
* Returns an any which contains the exception to be returned to
* the client.
*
* If the exception is a user exception which cannot be inserted
* into an any (e.g., it is unknown or the bindings don t provide
* the TypeCode
), then this attribute will be an any
* containing the system exception UNKNOWN
with a
* standard minor code of 1. However, the repository id of
* the exception is available in the received_exception_id
* attribute.
*
* @see #received_exception_id
*/
readonly attribute any received_exception;
/**
* Returns the repository id of the exception to be returned to
* the client.
*
* @see #received_exception
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
readonly attribute CORBA::RepositoryId received_exception_id;
/**
* Returns the IOP.TaggedComponent
with the given ID from
* the profile selected for this request.
*
* If there is more than one component for a given component ID, it
* is undefined which component this operation returns. If there is
* more than one component for a given component ID,
* get_effective_components
should be called instead.
*
* @param id The component id of the component which
* is to be returned.
* @return The IOP.TaggedComponent
obtained with the
* given identifier.
* @exception BAD_PARAM thrown, with a standard minor code of 28, if
* no component exists for the given component ID.
* @see #get_effective_components
*/
IOP::TaggedComponent get_effective_component
(in IOP::ComponentId id);
/**
* Returns an array of all tagged components with the given ID from the
* profile selected for this request.
*
* @param id The component id of the components which are to be returned.
* @return An array of TaggedComponent
objects, each of
* which contains the given identifier.
* @exception BAD_PARAM thrown, with a standard minor code of 28, if
* no component exists for the given component ID.
* @see #get_effective_component
*/
IOP::TaggedComponentSeq get_effective_components
(in IOP::ComponentId id);
/**
* Returns the given policy in effect for this operation.
*
* @exception INV_POLICY thrown, with a standard minor code of 1, if the
* policy type is not valid either because the specified type is
* not supported by this ORB or because a policy object of that type
* is not associated with this Object
* @param type The policy type which specifies the policy to be
* returned.
* @return The CORBA.Policy
obtained with the given type.
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
CORBA::Policy get_request_policy
(in CORBA::PolicyType type);
/**
* Allows Interceptors to add service contexts to the request.
*
* There is no declaration of the order of the service contexts.
* They may or may not appear in the order that they are added.
*
* @param service_context The IOP.ServiceContext
to be
* added to the request.
* @param replace Indicates the behavior of this operation when a
* service context already exists with the given ID. If false,
* then BAD_INV_ORDER
with a standard minor code of 15
* is thrown. If true, then the existing service context is
* replaced by the new one.
*/
void add_request_service_context (
in IOP::ServiceContext service_context,
in boolean replace);
};
// Should be type string
typedef string ServerId ;
// This should actually be the CORBA::ORBid type once that is available
typedef string ORBId ;
/** The name of an object adapter. This is unique only within
* the scope of the ORB that created the object adapter.
*/
typedef org::omg::CORBA::StringSeq AdapterName ;
/** Type of an object id. This provides the identity of a particular
* object that was created by an object adapter.
*/
typedef org::omg::CORBA::OctetSeq ObjectId ;
/**
* Request Information, accessible to server-side request interceptors.
*
* Some attributes and operations on ServerRequestInfo
are not
* valid at all interception points. The following table shows the validity
* of each attribute or operation. If it is not valid, attempting to access
* it will result in a BAD_INV_ORDER
being thrown with a
* standard minor code of 14.
*
* * *
* | receive_request_ service_contexts |
* receive_request | *send_reply | *send_exception | *send_other | *
---|---|---|---|---|---|
Inherited from RequestInfo: | *|||||
request_id |
* yes | *yes | *yes | *yes | *yes |
operation |
* yes | *yes | *yes | *yes | *yes |
arguments |
* no | *yes1 | *yes | *no2 | *no2 * |
exceptions |
* no | *yes | *yes | *yes | *yes |
contexts |
* no | *yes | *yes | *yes | *yes |
operation_context |
* no | *yes | *yes | *no | *no | *
result |
* no | *no | *yes | *no | *no | *
response_expected |
* yes | *yes | *yes | *yes | *yes |
sync_scope |
* yes | *yes | *yes | *yes | *yes |
request_id | *yes | yes | yes | yes | yes |
operation | *yes | yes | yes | yes | yes |
arguments | *no | yes1 * | yes | no2 | *no2 * |
exceptions | *no | yes | yes | yes | yes |
contexts | *no | yes | yes | yes | yes |
operation_context | *no | yes | yes | no | no |
result | *no | no | yes | no | no |
response_expected | *yes | yes | yes | yes | yes |
sync_scope | *yes | yes | yes | yes | yes |
reply_status | *no | no | yes | yes | yes |
forward_reference | *no | no | no | no | yes2 * |
get_slot | *yes | yes | yes | yes | yes |
get_request_service_context | *yes | no | yes | yes | yes |
get_reply_service_context | *no | no | yes | yes | yes |
ServerRequestInfo-specific: | *|||||
sending_exception | *no | no | no | yes | no |
object_id | *no | yes | yes | yes3 | *yes3 * |
adapter_id | *no | yes | yes | yes3 | *yes3 * |
server_id | *no | yes | yes | yes | yes |
orb_id | *no | yes | yes | yes | yes |
adapter_name | *no | yes | yes | yes | yes |
target_most_derived_interface | *no | yes | no4 | *no4 | *no4 * |
get_server_policy | *yes | yes | yes | yes | yes |
set_slot | *yes | yes | yes | yes | yes |
target_is_a | *no | yes | no4 | *no4 | *no4 * |
add_reply_service_context | *yes | yes | yes | yes | yes |
ServerRequestInfo
is passed to
* receive_request
, there is an entry in the list for
* every argument, whether in, inout, or out. But only the in and
* inout arguments will be available.reply_status
attribute is not
* LOCATION_FORWARD
, accessing this attribute will throw
* BAD_INV_ORDER
with a standard minor code of 14.NO_RESOURCES
with a standard minor
* code of 1 will be thrown if it is not available.ServantLocator
, then the ORB invokes the interception
* point after it calls ServantLocator.postinvoke()
* If the exception is a user exception which cannot be inserted into
* an any (e.g., it is unknown or the bindings don't provide the
* TypeCode
), then this attribute will be an any
* containing the system exception UNKNOWN
with a
* standard minor code of 1.
*
* @see
* PortableInterceptor
package comments for
* limitations / unimplemented features
*/
readonly attribute any sending_exception;
/**
* Returns the opaque object_id
describing the target of
* the operation invocation.
*/
readonly attribute ObjectId object_id;
/**
* Returns the opaque identifier for the object adapter.
*/
readonly attribute CORBA::OctetSeq adapter_id;
/**
* Returns the server ID that was specified on ORB::init using the -ORBServerId
* argument.
*/
readonly attribute ServerId server_id ;
/**
* Returns the ID that was used to create the ORB.
*/
readonly attribute ORBId orb_id ;
/**
* Returns the sequence of strings that identifies the object
* adapter instance that is handling this request.
*/
readonly attribute AdapterName adapter_name ;
/**
* Returns the repository id for the most derived interface of the
* servant.
*/
readonly attribute CORBA::RepositoryId
target_most_derived_interface;
/**
* Returns the policy in effect for this operation for the given
* policy type. The returned CORBA.Policy
object shall
* only be a policy whose type was registered via
* register_policy_factory
.
*
* @param type The CORBA.PolicyType
which specifies the
* policy to be returned.
* @return The CORBA.Policy
obtained with the given
* policy type.
* @exception INV_POLICY thrown, with a standard minor code of 2, if
* a policy for the given type was not registered via
* register_policy_factory
.
* @see ORBInitInfo#register_policy_factory
*/
CORBA::Policy get_server_policy
(in CORBA::PolicyType type);
/**
* Allows an Interceptor to set a slot in the
* PortableInterceptor.Current
that is in the scope of
* the request. If data already exists in that slot, it will be
* overwritten.
*
* @param id The id of the slot.
* @param data The data, in the form of an any, to store in that slot.
* @exception InvalidSlot thrown if the ID does not define an allocated
* slot.
* @see Current
*/
void set_slot (in SlotId id, in any data) raises (InvalidSlot);
/**
* Returns true if the servant is the given repository id,
* false if it is not.
*
* @param id The caller wants to know if the servant is this
* repository id.
* @return Is the servant the given RepositoryId?
*/
boolean target_is_a (in CORBA::RepositoryId id);
/**
* Allows Interceptors to add service contexts to the request.
*
* There is no declaration of the order of the service contexts.
* They may or may not appear in the order that they are added.
*
* @param service_context The IOP.ServiceContext
to add to
* the reply.
* @param replace Indicates the behavior of this operation when a
* service context already exists with the given ID. If false,
* then BAD_INV_ORDER
with a standard minor code of 15
* is thrown. If true, then the existing service context is
* replaced by the new one.
* @exception BAD_INV_ORDER thrown, with a standard minor code of 15, if
* replace is false and a service context already exists with the
* given ID.
*/
void add_reply_service_context (
in IOP::ServiceContext service_context,
in boolean replace);
};
/**
* Client-side request interceptor.
*
* A request Interceptor is designed to intercept the flow of a * request/reply sequence through the ORB at specific points so that * services can query the request information and manipulate the service * contexts which are propagated between clients and servers. The primary * use of request Interceptors is to enable ORB services to transfer * context information between clients and servers. There are two types * of request Interceptors: client-side and server-side. *
* To write a client-side Interceptor, implement the
* ClientRequestInterceptor
interface.
*
* @see ClientRequestInfo
*/
local interface ClientRequestInterceptor : Interceptor {
/**
* Allows an Interceptor to query request information and modify the
* service context before the request is sent to the server.
*
* This interception point may throw a system exception. If it does,
* no other Interceptors' send_request
operations are called.
* Those Interceptors on the Flow Stack are popped and their
* receive_exception
interception points are called. This
* interception point may also throw a ForwardRequest
* exception. If an Interceptor throws this exception, no other
* Interceptors' send_request
operations are
* called. Those Interceptors on the Flow Stack are popped and their
* receive_other
interception points are called.
*
* Compliant Interceptors shall properly follow completion_status
* semantics if they throw a system exception from this interception
* point. The completion_status
shall be
* COMPLETED_NO
.
*
* @param ri Information about the current request being intercepted.
* @exception ForwardRequest If thrown, indicates to the ORB that a
* retry of the request should occur with the new object given in
* the exception.
*/
void send_request (in ClientRequestInfo ri) raises (ForwardRequest);
/**
* Allows an Interceptor to query information during a Time-Independent
* Invocation (TII) polling get reply sequence.
*
* With TII, an application may poll for a response to a request sent
* previously by the polling client or some other client. This poll is
* reported to Interceptors through the send_poll
* interception point and the response is returned through the
* receive_reply
or receive_exception
* interception points. If the response is not available before the
* poll time-out expires, the system exception TIMEOUT
is
* thrown and receive_exception
is called with this
* exception.
*
* This interception point may throw a system exception. If it does,
* no other Interceptors' send_poll
operations are
* called. Those Interceptors on the Flow Stack are popped and their
* receive_exception
interception points are called.
*
* Compliant Interceptors shall properly follow
* completion_status
semantics if they throw a system
* exception from this interception point. The completion_status shall be
* COMPLETED_NO
.
*
* @param ri Information about the current request being intercepted.
* @exception TIMEOUT thrown if the response is not available before
* the poll time-out expires
*/
void send_poll (in ClientRequestInfo ri);
/**
* Allows an Interceptor to query the information on a reply after it
* is returned from the server and before control is returned to the
* client.
*
* This interception point may throw a system exception. If it does,
* no other Interceptors' receive_reply
operations are
* called. The remaining Interceptors in the Flow Stack shall have
* their receive_exception
interception point called.
*
* Compliant Interceptors shall properly follow
* completion_status
semantics if they throw a system
* exception from this interception point. The
* completion_status
shall be COMPLETED_YES
.
*
* @param ri Information about the current request being intercepted.
*/
void receive_reply (in ClientRequestInfo ri);
/**
* Indicates to the interceptor that an exception occurred. Allows
* an Interceptor to query the exception's information before it is
* thrown to the client.
*
* This interception point may throw a system exception. This has the
* effect of changing the exception which successive Interceptors
* popped from the Flow Stack receive on their calls to
* receive_exception
. The exception thrown to the client
* will be the last exception thrown by an Interceptor, or the original
* exception if no Interceptor changes the exception.
*
* This interception point may also throw a ForwardRequest
* exception. If an Interceptor throws this exception, no other
* Interceptors' receive_exception
operations are called.
* The remaining Interceptors in the Flow Stack are popped and have their
* receive_other
interception point called.
*
* If the completion_status
of the exception is not
* COMPLETED_NO
, then it is inappropriate for this
* interception point to throw a ForwardRequest
exception.
* The request s at-most-once semantics would be lost.
*
* Compliant Interceptors shall properly follow
* completion_status
semantics if they throw a system
* exception from this interception point. If the original exception is
* a system exception, the completion_status
of the new
* exception shall be the same as on the original. If the original
* exception is a user exception, then the completion_status
* of the new exception shall be COMPLETED_YES
.
*
* Under some conditions, depending on what policies are in effect, an
* exception (such as COMM_FAILURE
) may result in a retry
* of the request. While this retry is a new request with respect to
* Interceptors, there is one point of correlation between the original
* request and the retry: because control has not returned to the
* client, the PortableInterceptor.Current
for both the
* original request and the retrying request is the same.
*
* @param ri Information about the current request being intercepted.
* @exception ForwardRequest If thrown, indicates to the ORB that a
* retry of the request should occur with the new object given in
* the exception.
*/
void receive_exception (in ClientRequestInfo ri) raises (ForwardRequest);
/**
* Allows an Interceptor to query the information available when a
* request results in something other than a normal reply or an
* exception. For example, a request could result in a retry
* (e.g., a GIOP Reply with a LOCATION_FORWARD
status was
* received); or on asynchronous calls, the reply does not immediately
* follow the request, but control shall return to the client and an
* ending interception point shall be called.
*
* For retries, depending on the policies in effect, a new request may or
* may not follow when a retry has been indicated. If a new request does
* follow, while this request is a new request, with respect to
* Interceptors, there is one point of correlation between the original
* request and the retry: because control has not returned to the client,
* the request scoped PortableInterceptor.Current
for both
* the original request and the retrying request is the same.
*
* This interception point may throw a system exception. If it does, no
* other Interceptors' receive_other
operations are called.
* The remaining Interceptors in the Flow Stack are popped and have
* their receive_exception
interception point called.
*
* This interception point may also throw a ForwardRequest
* exception. If an Interceptor throws this exception, successive
* Interceptors' receive_other
operations are called with
* the new information provided by the ForwardRequest
* exception.
*
* Compliant Interceptors shall properly follow
* completion_status
semantics if they throw a system
* exception from this interception point. The
* completion_status
shall be COMPLETED_NO
.
* If the target invocation had completed, this interception point
* would not be called.
*
* @param ri Information about the current request being intercepted.
* @exception ForwardRequest If thrown, indicates to the ORB that a
* retry of the request should occur with the new object given in
* the exception.
*/
void receive_other (in ClientRequestInfo ri) raises (ForwardRequest);
};
/**
* Server-side request interceptor.
*
* A request Interceptor is designed to intercept the flow of a * request/reply sequence through the ORB at specific points so that * services can query the request information and manipulate the service * contexts which are propagated between clients and servers. The primary * use of request Interceptors is to enable ORB services to transfer * context information between clients and servers. There are two types * of request Interceptors: client-side and server-side. *
* To write a server-side Interceptor, implement the * ServerRequestInterceptor interface. * * @see ServerRequestInfo */ local interface ServerRequestInterceptor : Interceptor { /** * Allows the interceptor to process service context information. *
* At this interception point, Interceptors must get their service
* context information from the incoming request transfer it to
* PortableInterceptor.Current
's slots.
*
* This interception point is called before the servant manager is called. * Operation parameters are not yet available at this point. This * interception point may or may not execute in the same thread as * the target invocation. *
* This interception point may throw a system exception. If it does,
* no other Interceptors' receive_request_service_contexts
* operations are called. Those Interceptors on the Flow Stack are
* popped and their send_exception
interception points are
* called.
*
* This interception point may also throw a ForwardRequest
* exception. If an Interceptor throws this exception, no other
* Interceptors' receive_request_service_contexts
operations
* are called. Those Interceptors on the Flow Stack are popped and
* their send_other
interception points are called.
*
* Compliant Interceptors shall properly follow
* completion_status
semantics if they throw a system
* exception from this interception point. The
* completion_status
shall be COMPLETED_NO.
*
* @param ri Information about the current request being intercepted.
* @exception ForwardRequest If thrown, indicates to the ORB that a
* retry of the request should occur with the new object given in
* the exception.
*/
void receive_request_service_contexts (in ServerRequestInfo ri)
raises (ForwardRequest);
/**
* Allows an Interceptor to query request information after all the
* information, including operation parameters, are available. This
* interception point shall execute in the same thread as the target
* invocation.
*
* In the DSI model, since the parameters are first available when
* the user code calls arguments
, receive_request
* is called from within arguments
. It is possible that
* arguments
is not called in the DSI model. The target
* may call set_exception
before calling
* arguments
. The ORB shall guarantee that
* receive_request
is called once, either through
* arguments
or through set_exception
. If it
* is called through set_exception
, requesting the
* arguments will result in NO_RESOURCES
being thrown with
* a standard minor code of 1.
*
* This interception point may throw a system exception. If it does, no
* other Interceptors' receive_request
operations are
* called. Those Interceptors on the Flow Stack are popped and their
* send_exception
interception points are called.
*
* This interception point may also throw a ForwardRequest
* exception. If an Interceptor throws this exception, no other
* Interceptors' receive_request
operations are called.
* Those Interceptors on the Flow Stack are popped and their
* send_other
interception points are called.
*
* Compliant Interceptors shall properly follow
* completion_status
semantics if they throw a system
* exception from this interception point. The
* completion_status
shall be COMPLETED_NO
.
*
* @param ri Information about the current request being intercepted.
* @exception ForwardRequest If thrown, indicates to the ORB that a
* retry of the request should occur with the new object given in
* the exception.
*/
void receive_request (in ServerRequestInfo ri) raises (ForwardRequest);
/**
* Allows an Interceptor to query reply information and modify the
* reply service context after the target operation has been invoked
* and before the reply is returned to the client. This interception
* point shall execute in the same thread as the target invocation.
*
* This interception point may throw a system exception. If it does,
* no other Interceptors' send_reply
operations are called.
* The remaining Interceptors in the Flow Stack shall have their
* send_exception
interception point called.
*
* Compliant Interceptors shall properly follow
* completion_status
semantics if they throw a
* system exception from this interception point. The
* completion_status
shall be COMPLETED_YES
.
*
* @param ri Information about the current request being intercepted.
*/
void send_reply (in ServerRequestInfo ri);
/**
* Allows an Interceptor to query the exception information and modify
* the reply service context before the exception is thrown to the client.
* When an exception occurs, this interception point is called. This
* interception point shall execute in the same thread as the target
* invocation.
*
* This interception point may throw a system exception. This has the
* effect of changing the exception which successive Interceptors
* popped from the Flow Stack receive on their calls to
* send_exception
. The exception thrown to the client will
* be the last exception thrown by an Interceptor, or the original
* exception if no Interceptor changes the exception.
*
* This interception point may also throw a ForwardRequest
* exception. If an Interceptor throws this exception, no other
* Interceptors' send_exception
operations are called. The
* remaining Interceptors in the Flow Stack shall have their
* send_other
interception points called.
*
* If the completion_status
of the exception is not
* COMPLETED_NO
, then it is inappropriate for this
* interception point to throw a ForwardRequest
exception.
* The request's at-most-once semantics would be lost.
*
* Compliant Interceptors shall properly follow
* completion_status
semantics if they throw a system
* exception from this interception point. If the original exception
* is a system exception, the completion_status
of the new
* exception shall be the same as on the original. If the original
* exception is a user exception, then the completion_status
* of the new exception shall be COMPLETED_YES
.
*
* @param ri Information about the current request being intercepted.
* @exception ForwardRequest If thrown, indicates to the ORB that a
* retry of the request should occur with the new object given in
* the exception.
*/
void send_exception (in ServerRequestInfo ri) raises (ForwardRequest);
/**
* Allows an Interceptor to query the information available when a
* request results in something other than a normal reply or an
* exception. For example, a request could result in a retry
* (e.g., a GIOP Reply with a LOCATION_FORWARD
status was
* received). This interception point shall execute in the same thread
* as the target invocation.
*
* This interception point may throw a system exception. If it does,
* no other Interceptors' send_other
operations are called.
* The remaining Interceptors in the Flow Stack shall have their
* send_exception
interception points called.
*
* This interception point may also throw a ForwardRequest
* exception. If an Interceptor throws this exception, successive
* Interceptors' send_other
operations are called with
* the new information provided by the ForwardRequest
* exception.
*
* Compliant Interceptors shall properly follow
*
* If a policy for the given type is not known to the ORB, then this
* operation will throw
* Any number of components may exist with the same component ID.
*
* @param tagged_component The IOP.TaggedComponent to add.
*/
void add_ior_component
(in IOP::TaggedComponent tagged_component);
/**
* A portable ORB service implementation calls
*
* Any number of components may exist with the same component ID.
*
* @param tagged_component The
* In some cases, a portable ORB service implementation may need to add
* information describing the server's or object's ORB service related
* capabilities to object references in order to enable the ORB service
* implementation in the client to function properly.
*
* This is supported through the
* An implementation of
* Any exception thrown from this method is handled by the Object
* Adapter that called this interceptor. In the case of the POA,
* an exception results in a OBJ_ADAPTER exception with an OMG
* standard minor code of 6.
* @param info The IORInfo for the object adapter being created.
*/
void components_established( in IORInfo info ) ;
/** Called whenever the state of an adapter manager changes.
* For the POA, that is the POAManager. If the state change
* is reported through
* A portable ORB service implementation registers an instance of the
*
* The ORB calls
* The
* An Interceptor may be anonymous, i.e., have an empty string as the
* name attribute. Any number of anonymous Interceptors may be
* registered with the ORB so, if the Interceptor being registered
* is anonymous, the registration operation will not throw
*
* This operation is only valid during post_init.
*/
Object resolve_initial_references (in ObjectId id) raises (InvalidName);
/**
* Used to add a client-side request Interceptor to the list of
* client-side request Interceptors.
*
* @param interceptor The
* Note that while slot id's can be allocated within an ORB initializer,
* the slots themselves cannot be initialized.
*
* @return The index to the slot which has been allocated.
* @exception BAD_INV_ORDER thrown, with a standard minor code of 14, if
*
* Interceptors are intended to be a means by which ORB services gain
* access to ORB processing, effectively becoming part of the ORB.
* Since Interceptors are part of the ORB, when
* An Interceptor is registered by registering an associated
*
* Registering ORB Initializers in Java
*
* ORBInitializers are registered via Java ORB properties.
*
* The property names are of the form:
*
* Example
*
* A client-side logging service written by company X, for example, may
* have the following ORBInitializer implementation:
*
* Notes about Registering Interceptors
*
* Request Interceptors are registered on a per-ORB basis.
*
* To achieve virtual per-object Interceptors, query the policies on the
* target from within the interception points to determine whether they
* should do any work.
*
* To achieve virtual per-POA Interceptors, instantiate each POA with a
* different ORB. While Interceptors may be ordered administratively,
* there is no concept of order with respect to the registration of
* Interceptors. Request Interceptors are concerned with service contexts.
* Service contexts have no order, so there is no purpose for request
* Interceptors to have an order. IOR Interceptors are concerned with
* tagged components. Tagged components also have no order, so there
* is no purpose for IOR Interceptors to have an order.
*
* Registration code should avoid using the ORB (i.e., calling
*
* Calling the completion_status
semantics if they throw a system
* exception from this interception point. The
* completion_status
shall be COMPLETED_NO
.
*
* @param ri Information about the current request being intercepted.
* @exception ForwardRequest If thrown, indicates to the ORB that a
* retry of the request should occur with the new object given in
* the exception.
*/
void send_other (in ServerRequestInfo ri) raises (ForwardRequest);
};
/** The object reference factory. This provides the capability of
* creating an object reference.
*/
abstract valuetype ObjectReferenceFactory {
/** make_object creates a CORBA object reference according
* to the data in this template, with the given repository ID and
* object ID.
*/
Object make_object( in string repositoryId, in ObjectId object_id ) ;
} ;
/** The object reference template. An instance of this must
* exist for each object adapter created in an ORB. The server_id,
* orb_id, and adapter_name attributes uniquely identify this template
* within the scope of an IMR. Note that adapter_id is similarly unique
* within the same scope, but it is opaque, and less useful in many
* cases.
*/
abstract valuetype ObjectReferenceTemplate : ObjectReferenceFactory {
readonly attribute ServerId server_id ;
readonly attribute ORBId orb_id ;
readonly attribute AdapterName adapter_name ;
} ;
/** Sequence of object reference templates is used for reporting state
* changes that do not occur on the adapter manager.
*/
typedef sequenceIORInterceptor.establish_components
.
*
* @see IORInterceptor
*/
local interface IORInfo {
/**
* Allows an ORB service implementation to determine what server side
* policy of a particular type is in effect for an IOR being
* constructed. When the IOR being constructed is for an object
* implemented using a POA, all Policy objects passed to the
* PortableServer.POA.create_POA
call that created that
* POA are accessable via get_effective_policy
.
* INV_POLICY
with a standard minor
* code of 2.
*
* @param type an int specifying the type of policy to return.
* @return The effective CORBA.Policy
object of the
* requested type. If the given policy type is known, but no policy
* of that type is in effect, then this operation will return a
* nil object reference.
*/
CORBA::Policy get_effective_policy
(in CORBA::PolicyType type);
/**
* A portable ORB service implementation calls
* add_ior_component
from its implementation of
* establish_components
to add a tagged component to the
* set which will be included when constructing IORs. The components in
* this set will be included in all profiles.
* add_ior_component_to_profile
from its implementation of
* establish_components
to add a tagged component to the
* set which will be included when constructing IORs. The components in
* this set will be included in the specified profile.
* IOP.TaggedComponent
to add.
* @param profile_id The profile id of the profile to
* which this component will be added.
* @exception BAD_PARAM thrown, with a standard minor code of 29, if the
* given profile ID does not define a known profile or it is
* impossible to add components to that profile.
*/
void add_ior_component_to_profile (
in IOP::TaggedComponent tagged_component,
in IOP::ProfileId profile_id);
/** Return the adapter manager id of the object adapter
* that was just created and is running IOR interceptors.
*/
readonly attribute AdapterManagerId manager_id ;
/** Return the adapter state of the object adapter
* that was just created and is running IOR interceptors.
*/
readonly attribute AdapterState state ;
/** Return the object reference template of the object adapter
* that was just created and is running IOR interceptors.
*/
readonly attribute ObjectReferenceTemplate adapter_template ;
/** On read, returns the current factory that will be used to create
* object references for the object adapter that was just created
* and is running IOR interceptors. By default, this factory is the same
* as the value of the adapter_template attribute. The current_factory
* may also be set to another object reference template inside an
* IORInterceptor_3_0.
*/
attribute ObjectReferenceFactory current_factory ;
};
/**
* Interceptor used to establish tagged components in the profiles within
* an IOR.
* IORInterceptor
and
* IORInfo
interfaces.
*
* @see IORInfo
*/
local interface IORInterceptor : Interceptor {
/**
* A server side ORB calls the establish_components
* operation on all registered IORInterceptor
instances
* when it is assembling the list of components that will be included
* in the profile or profiles of an object reference. This operation
* is not necessarily called for each individual object reference.
* In the case of the POA, this operation is called each time POA::create_POA
* is called. In any case, establish_components
is
* guaranteed to be called at least once for each distinct set of
* server policies.
* establish_components
must not
* throw exceptions. If it does, the ORB shall ignore the exception
* and proceed to call the next IOR Interceptor's
* establish_components
operation.
*
* @param info The IORInfo
instance used by the ORB
* service to query applicable policies and add components to be
* included in the generated IORs.
*/
void establish_components (in IORInfo info);
};
local interface IORInterceptor_3_0 : IORInterceptor {
/** The components_established method is invoked on all registered
* IORInterceptor_3_0 instances after establish_components
* has been invoked on all registered IORInterceptor instances.
* The adapter_template is available in info during this call.
* The current_factory may be get or set in info during this call.
* adapter_manager_state_changed
,
* it is not reported through adapter_state_changed
.
* @param id the adapter manager id of the adapter manager that
* changed state
* @param state the new state of the adapter manager
*/
void adapter_manager_state_changed( in AdapterManagerId id,
in AdapterState state ) ;
/** Called whenever the state of an object adapter changes, and
* the state change is not caused by an adapter manager. Such
* changes are reported to all registered IORInterceptor_3_0
* instances.
* @param templates the sequence of ObjectReferenceTemplate
instances
* on which this state change occurred.
* @param state the new AdapterState
shared by all of the templates.
*/
void adapter_state_changed( in ObjectReferenceTemplateSeq templates,
in AdapterState state ) ;
};
/**
* Enables policy types to be constructed using
* CORBA.ORB.create_policy
.
* PolicyFactory
interface during ORB initialization in order
* to enable its policy types to be constructed using
* CORBA.ORB.create_policy
. The POA is required to preserve
* any policy which is registered with ORBInitInfo
in this
* manner.
*
* @see ORBInitInfo#register_policy_factory
*/
local interface PolicyFactory
{
/**
* Returns an instance of the appropriate interface derived from
* CORBA.Policy
whose value corresponds to the
* specified any.
* create_policy
on a registered
* PolicyFactory
instance when
* CORBA.ORB.create_policy
is called for the
* PolicyType
under which the PolicyFactory
has
* been registered. The create_policy
operation then
* returns an instance of the appropriate interface derived from
* CORBA.Policy
whose value corresponds to the specified
* any. If it cannot, it shall throw an exception as described for
* CORBA.ORB.create_policy
.
*
* @param type An int specifying the type of policy being created.
* @param value An any containing data with which to construct the
* CORBA.Policy
.
* @return A CORBA.Policy
object of the specified type and
* value.
*/
CORBA::Policy create_policy
(in CORBA::PolicyType type, in any value)
raises (CORBA::PolicyError);
};
/**
* Passed to each
ORBInitializer
, allowing it to
* to register interceptors and perform other duties while the ORB is
* initializing.
* ORBInitInfo
object is only valid during
* ORB.init
. If a service keeps a reference to its
* ORBInitInfo
object and tries to use it after
* ORB.init
returns, the object no longer exists and an
* OBJECT_NOT_EXIST
exception shall be thrown.
*
* @see ORBInitializer
*/
local interface ORBInitInfo {
/** Object id, represented as a String */
typedef string ObjectId;
/**
* Only one Interceptor of a given name can be registered with the
* ORB for each Interceptor type. If an attempt is made to register a
* second Interceptor with the same name, DuplicateName is thrown.
* DuplicateName
.
*/
exception DuplicateName {
/**
* The name for which there was already an interceptor registered.
*/
string name;
};
/**
* This exception is thrown by
* register_initial_reference
and
* resolve_initial_references
.
* register_initial_reference
throws InvalidName
* if:
*
*
* resolve_initial_references
throws
* InvalidName
if the name to be resolved is invalid.
*/
exception InvalidName {};
/**
* Returns the arguments passed to ORB.init
. They may or
* may not contain the ORB's arguments.
*/
readonly attribute CORBA::StringSeq arguments;
/**
* Returns the ID of the ORB being initialized.
*/
readonly attribute string orb_id;
/**
* Returns the IOP.CodecFactory
. The
* CodecFactory
is normally obtained via a call to
* ORB.resolve_initial_references( "CodecFactory" )
, but
* since the ORB is not yet available and Interceptors, particularly when
* processing service contexts, will require a Codec
, a
* means of obtaining a Codec
is necessary during ORB
* initialization.
*/
readonly attribute IOP::CodecFactory codec_factory;
/**
* Identical to ORB.register_initial_reference
. This same
* functionality exists here because the ORB, not yet fully initialized,
* is not yet available but initial references may need to be
* registered as part of Interceptor registration. The only difference
* is that the version of this operation on the ORB uses PIDL
* (CORBA.ORB.ObjectId
) and
* (CORBA.ORB.InvalidName
) whereas the version in this
* interface uses IDL defined in this interface; the semantics are
* identical.
*/
void register_initial_reference (in ObjectId id, in Object obj)
raises (InvalidName);
// This was incorrectly returning void in orbos/99-12-02, correction
// from errata in orbos/00-01-01
/**
* Identical to ORB.resolve_initial_references
. This same
* functionality exists here because the ORB, not yet fully initialized,
* is not yet available but initial references may be required from the
* ORB as part of Interceptor registration. The only difference is that
* the version of this operation on the ORB uses PIDL
* (CORBA::ORB::ObjectId
and
* CORBA::ORB::InvalidName
) whereas the version in this
* interface uses IDL defined in this interface; the semantics
* are identical.
* ClientRequestInterceptor
to be
* added.
* @exception DuplicateName thrown if a client-side request Interceptor
* has already been registered with this Interceptor's name.
*/
void add_client_request_interceptor
(in ClientRequestInterceptor interceptor)
raises (DuplicateName);
/**
* Used to add a server-side request Interceptor to the list of
* server-side request Interceptors.
*
* @param interceptor The ServerRequestInterceptor to be added.
* @exception DuplicateName thrown if a server-side request Interceptor
* has already been registered with this Interceptor's name
*/
void add_server_request_interceptor (
in ServerRequestInterceptor interceptor)
raises (DuplicateName);
/**
* Used to add an IOR Interceptor to the list of IOR Interceptors.
*
* @param interceptor The IORInterceptor to be added.
* @exception DuplicateName thrown if an IOR Interceptor has already
* been registered with this Interceptor's name.
*/
void add_ior_interceptor (in IORInterceptor interceptor)
raises (DuplicateName);
/**
* Called to allocate a slot on PortableInterceptor.Current
.
* set_slot
or get_slot
is called on the
* PICurrent
within an ORB initializer.
* @see Current
*/
SlotId allocate_slot_id ();
/**
* Registers a PolicyFactory
for the given
* PolicyType
.
*
* @param type The policy type that the given PolicyFactory
* serves.
* @param policy_factory The factory for the given policy type.
* @exception BAD_INV_ORDER thrown, with a standard minor code of 16, if
* a PolicyFactory
already exists for the given
* PolicyType
.
*/
void register_policy_factory (
in CORBA::PolicyType type,
in PolicyFactory policy_factory);
};
/**
* Facilitates interceptor registration and ORB initialization.
* ORB.init
* returns an ORB, the Interceptors shall have been registered.
* Interceptors cannot be registered on an ORB after it has been
* returned by a call to ORB.init
.
* ORBInitializer
object which implements the
* ORBInitializer
interface. When an ORB is initializing,
* it shall call each registered ORBInitializer
, passing it
* an ORBInitInfo
object which is used to register its
* Interceptor.
*
* where
* org.omg.PortableInterceptor.ORBInitializerClass.<Service>
*
<Service>
is the string name of a class
* which implements
*
* To avoid name collisions, the reverse DNS name convention should be
* used. For example, if company X has three initializers, it could define
* the following properties:
*
* org.omg.PortableInterceptor.ORBInitializer
*
*
* During ORB.init, these ORB properties which begin with
*
* org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init1
*
* org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init2
*
* org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init3
*
org.omg.PortableInterceptor.ORBInitializerClass
shall be
* collected, the <Service>
portion of each property
* shall be extracted, an object shall be instantiated with the
* <Service>
string as its class name, and the
* pre_init
and post_init
methods shall be
* called on that object. If there are any exceptions, the ORB shall
* ignore them and proceed.
*
* To run a program called
* package com.x.logging;
*
* import org.omg.PortableInterceptor.Interceptor;
* import org.omg.PortableInterceptor.ORBInitializer;
* import org.omg.PortableInterceptor.ORBInitInfo;
*
* public class LoggingService implements ORBInitializer {
* void pre_init( ORBInitInfo info ) {
* // Instantiate the Logging Service s Interceptor.
* Interceptor interceptor = new LoggingInterceptor();
*
* // Register the Logging Service s Interceptor.
* info.add_client_request_interceptor( interceptor );
* }
*
* void post_init( ORBInitInfo info ) {
* // This service does not need two init points.
* }
* }
*
MyApp
using this logging
* service, the user could type:
*
*
* java
*-Dorg.omg.PortableInterceptor.ORBInitializerClass.com.x.Logging.LoggingService
* MyApp
*
ORB.init
with the provided orb_id
). Since
* registration occurs during ORB initialization, results of invocations
* on this ORB while it is in this state are undefined.
*
* @see ORBInitInfo
*/
local interface ORBInitializer {
/**
* Called during ORB initialization. If it is expected that initial
* services registered by an interceptor will be used by other
* interceptors, then those initial services shall be registered at
* this point via calls to
* ORBInitInfo.register_initial_reference
.
*
* @param info provides initialization attributes and operations by
* which Interceptors can be registered.
*/
void pre_init (in ORBInitInfo info);
/**
* Called during ORB initialization. If a service must resolve initial
* references as part of its initialization, it can assume that all
* initial references will be available at this point.
* post_init
operations is not the final
* task of ORB initialization. The final task, following the
* post_init
calls, is attaching the lists of registered
* interceptors to the ORB. Therefore, the ORB does not contain the
* interceptors during calls to post_init
. If an
* ORB-mediated call is made from within post_init
, no
* request interceptors will be invoked on that call.
* Likewise, if an operation is performed which causes an IOR to be
* created, no IOR interceptors will be invoked.
*
* @param info provides initialization attributes and
* operations by which Interceptors can be registered.
*/
void post_init (in ORBInitInfo info);
};
};