Previous | Table of Contents | Next |
local interface ServerRequestInfo : RequestInfo { readonly attribute any sending_exception; readonly attribute CORBA::OctetSeq
object_id; readonly attribute CORBA::OctetSeq adapter_id; readonly attribute ServerId server_id ; readonly attribute ORBId
orb_id ; readonly attribute AdapterName adapter_name; readonly attribute CORBA::RepositoryId
target_most_derived_interface; CORBA::Policy get_server_policy (in CORBA::PolicyType type); void set_slot (in SlotId id, in
any data) raises (InvalidSlot); boolean target_is_a (in CORBA::RepositoryId id); void add_reply_service_context (
in IOP::ServiceContext service_context, in boolean replace); };
Some attributes and operations on ServerRequestInfo are not valid at all interception points.
Table 21-2 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 raised with a standard minor code of 14.
Table 21-2 ServerRequestInfo Validity
request_idoperationargumentsexceptionscontextsoperation_context |
receive_request_ service_contexts |
receive_ request |
send_reply |
send_ exception |
send_ other |
yes | yes | yes | yes | yes | |
yes | yes | yes | yes | yes | |
no | yes1 | yes | no2 | no2 | |
no | yes | yes | yes | yes | |
no | yes | yes | yes | yes | |
no | yes | yes | no | no |
Table 21-2 ServerRequestInfo Validity
resultresponse_expectedsync_scopereply_statusforward_referenceget_slotget_request_service_contextget_reply_service_contextsending_exceptionobject_idadapter_idserver_idorb_idadapter_nametarget_most_derived_interfaceget_server_policyset_slottarget_is_aadd_reply_service_context |
receive_request_ service_contexts |
receive_ request |
send_reply |
send_ exception |
send_ other |
no | no | yes | no | no | |
yes | yes | yes | yes | yes | |
yes | yes | yes | yes | yes | |
no | no | yes | yes | yes | |
no | no | no | no | yes2 | |
yes | yes | yes | yes | yes | |
yes | yes | yes | yes | yes | |
no | no | yes | yes | yes | |
no | no | no | yes | no | |
no | yes | yes | yes3 | yes3 | |
no | yes | yes | yes3 | yes3 | |
no | yes | yes | yes | yes | |
no | yes | yes | yes | yes | |
no | yes | yes | yes | yes | |
no | yes | no4 | no4 | no4 | |
yes | yes | yes | yes | yes | |
yes | yes | yes | yes | yes | |
no | yes | no4 | no4 | no4 | |
yes | yes | yes | yes | yes |
1When 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.
2 If the reply_status attribute is not LOCATION_FORWARD, accessing this attribute will raise BAD_INV_ORDER with a standard
minor code of 14.
3 If the servant locator caused a location forward, or raised an exception, this attribute/operation may not be available
in this interception point. NO_RESOURCES with a standard minor code of 1 will be raised if it is not available.
4 The operation is not available in this interception point because the necessary information requires access to the target
object's servant, which may no longer be available to the ORB. For example, if the object's adapter is a POA that uses a ServantLocator,
then the ORB invokes the interception point after it calls ServantLocator::postinvoke().
21.3.14.1 sending_exception
This attribute is an any that contains the exception to be returned to the client.
If the exception is a user exception that cannot be inserted into an any (for example, 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.
21.3.14.2 object_id
This attribute is the opaque object_id describing the target of the operation invocation.
21.3.14.3 adapter_id
This attribute is the opaque identifier for the object adapter.
21.3.14.4 server_id
The value of the server_id attribute is the value that was passed into the ORB::init call (see
Section 4.5.1.1, “Server ID,? on page 4-27) using the
-ORBServerId argument when the ORB was created.
21.3.14.5 orb_id
The value of the orb_id attribute is the value that was passed into the ORB::init call.
In Java, this is accomplished using the -ORBid argument in the ORB.init call that created the ORB containing the object adapter
that created this template. What happens if the same ORBid is used on multiple ORB::init calls in the same server is currently
undefined.
21.3.14.6 adapter_name
The adapter_name attribute defines a name for the object adapter that services requests for the invoked object. In the case
of the POA, the adapter_name is the sequence of names from the root POA to the POA that services the request. The name of
the root POA is the sequence containing only the string “RootPOA?.
21.3.14.7 target_most_derived_interface
This attribute is the RepositoryID for the most derived interface of the servant.
21.3.14.8 get_server_policy
This operation 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
(see Section 21.7.2.12, “register_policy_factory,? on
page 21-54).
If a policy for the given type was not registered via register_policy_factory, this operation will raise INV_POLICY with a
standard minor code of 3.
Parameterstype |
|||||
The CORBA::PolicyType that specifies the policy to be | |||||
returned. |
Return Value The CORBA::Policy obtained with the given policy type.
21.3.14.9 set_slot
This operation 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.
If the ID does not define an allocated slot, InvalidSlot is raised.
See
Section 21.4, “Portable Interceptor Current,? on page 21-33 for an explanation of
slots and PortableInterceptor::Current.
Parameters
id The SlotId of the slot.
data The data, in the form of an any, to store in that slot.
21.3.14.10 target_is_a
This operation returns true if the servant is the given RepositoryId, false if it is not.
Parameters
id The caller wants to know if the servant is this CORBA::RepositoryId.
Return Value Is the servant the given RepositoryId?
21.3.14.11 add_reply_service_context
This operation 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.
Parameters
service_context The IOP::ServiceContext to add to the reply.
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 11 is raised. If true, then the existing service context is replaced by the new
one.