VisiBroker for Java

org.omg.PortableInterceptor
Interface ServerRequestInfoOperations

All Superinterfaces:
RequestInfoOperations
All Known Subinterfaces:
ServerRequestInfo

public interface ServerRequestInfoOperations
extends RequestInfoOperations

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
request_id yes yes yes yes yes
operation yes yes yes yes yes
arguments no yes1 yes no2 no2
exception 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 yes yes yes yes
get_reply_service_context no no yes yes yes
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
1 When 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() does not returns 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 / method 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 method 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().


Method Summary
 byte[] adapter_id()
          This method returns opaque identifier for the object adapter, in the form of CORBA::OctetSequence.
 java.lang.String[] adapter_name()
          The method returns the name for the object adapter, in the form of CORBA::StringSequence, 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.
 void add_reply_service_context(ServiceContext service_context, boolean replace)
          This method allows interceptors to add service contexts to the request.
 Policy get_server_policy(int type)
          This method returns the policy in effect for this operation for the given policy type.
 byte[] object_id()
          This method returns the opaque object_id, in the form of CORBA::OctetSequence, that describes the target of the operation invocation.
 java.lang.String orb_id()
          The method returns the value that was passed into the ORB.init() call.
 Any sending_exception()
          This method returns data, in the form CORBA::Any, that contains the exception to be returned to the client.
 java.lang.String server_id()
          This method returns the value that was passed into the ORB.init call using the -ORBServerId argument when the ORB was created.
 void set_slot(int id, Any data)
          This method allows an interceptor to set a slot in the Current that is in the scope of the request.
 boolean target_is_a(java.lang.String id)
          This method returns true if the servant is the given RepositoryId, false if it is not.
 java.lang.String target_most_derived_interface()
          This method returns the RepositoryID for the most derived interface of the servant.
 
Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations
arguments, contexts, exceptions, forward_reference, get_reply_service_context, get_request_service_context, get_slot, operation_context, operation, reply_status, request_id, response_expected, result, sync_scope
 

Method Detail

add_reply_service_context

void add_reply_service_context(ServiceContext service_context,
                               boolean replace)
This method 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 method when a service context already exists with the given ID. If false, then BAD_INV_ORDER with a standard minor code of 15 is raised. If true then the existing service context is replaced by the new one.

target_is_a

boolean target_is_a(java.lang.String id)
This method 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.
Returns:
true if the servant is the given RepositoryId, false if it is not.

set_slot

void set_slot(int id,
              Any data)
              throws InvalidSlot
This method allows an interceptor to set a slot in the 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 exception is raised.

Parameters:
id - The SlotId of the slot.
data - The data, in the form of a CORBA::Any, to store in that slot.
Throws:
InvalidSlot - The supplied SlotId is invalid

get_server_policy

Policy get_server_policy(int type)
This method returns the policy in effect for this operation for the given policy type. The returned CORBA::Policy object will only be a policy whose type was registered through register_policy_factory. If a policy for the given type was not registered through register_policy_factory, this method will raise INV_POLICY with a standard minor code of 3.

Parameters:
type - The CORBA::PolicyType which specifies the policy to be returned.
Returns:
policy in effect for this operation for the given policy type.

target_most_derived_interface

java.lang.String target_most_derived_interface()
This method returns the RepositoryID for the most derived interface of the servant.


adapter_id

byte[] adapter_id()
This method returns opaque identifier for the object adapter, in the form of CORBA::OctetSequence.


object_id

byte[] object_id()
This method returns the opaque object_id, in the form of CORBA::OctetSequence, that describes the target of the operation invocation.


adapter_name

java.lang.String[] adapter_name()
The method returns the name for the object adapter, in the form of CORBA::StringSequence, 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 root POA is not named in this sequence.


orb_id

java.lang.String orb_id()
The method returns 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.


server_id

java.lang.String server_id()
This method returns the value that was passed into the ORB.init call using the -ORBServerId argument when the ORB was created.


sending_exception

Any sending_exception()
This method returns data, in the form CORBA::Any, that contains the exception to be returned to the client. If the exception is a user exception which cannot be inserted into a CORBA::Any (e.g., it is unknown or the bindings don't provide the TypeCode),then this attribute will be an CORBA::Any containing the system exception UNKNOWN with a standard minor code of 1.


Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online