VisiBroker for Java

org.omg.PortableInterceptor
Interface RequestInfoOperations

All Known Subinterfaces:
ClientRequestInfo, ClientRequestInfoOperations, RequestInfo, ServerRequestInfo, ServerRequestInfoOperations

public interface RequestInfoOperations

Request Information, accessible to interceptors. This is the base class from which ClientRequestInfo and ServerRequestInfo are derived. 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.


Method Summary
 Parameter[] arguments()
          This method returns an array of type Parameter containing the arguments on the operation being invoked.
 java.lang.String[] contexts()
          This method returns an array of java.lang.String describing the contexts that may be passed on this operation invocation.
 TypeCode[] exceptions()
          This method returns an array of type CORBA::TypeCode describing the TypeCodes of the user exceptions that this operation invocation may raise.
 Object forward_reference()
          If the reply_status() returns LOCATION_FORWARD, then this method returns an object to which the request will be forwarded.
 ServiceContext get_reply_service_context(int id)
          This method returns a copy of the service context with the given ID that is associated with the reply.
 ServiceContext get_request_service_context(int id)
          This method returns a copy of the service context with the given ID that is associated with the request.
 Any get_slot(int id)
          This method returns the data, in the form of a CORBA::Any, from the given slot of the Current that is in the scope of the request.
 java.lang.String[] operation_context()
          This method returns an array of java.lang.String containing the contexts being sent on the request.
 java.lang.String operation()
          This method returns name of the operation being invoked.
 short reply_status()
          This method returns an attribute which describes the state of the result of the operation invocation.
 int request_id()
          This method returns the ID which uniquely identifies an active request / reply sequence.
 boolean response_expected()
          This method returns a boolean value which indicates whether a response is expected.
 Any result()
          This method returns the data, in the form of CORBA::Any, that contains the result of the operation invocation.
 short sync_scope()
          This method returns an attribute, defined in the Messaging specification, is pertinent only when response_expected is false.
 

Method Detail

get_reply_service_context

ServiceContext get_reply_service_context(int id)
This method returns a copy of the service context with the given ID that is associated with the reply. If the request?s service context does not contain an entry for that ID, BAD_PARAM with a standard minor code of 26 is raised.

Parameters:
id - The ID of the service context to be returned.

get_request_service_context

ServiceContext get_request_service_context(int id)
This method returns a copy of the service context with the given ID that is associated with the request. If the requests service context does not contain an entry for that ID, BAD_PARAM with a standard minor code of 26 is raised.

Parameters:
id - The ID of the service context to be returned.

get_slot

Any get_slot(int id)
             throws InvalidSlot
This method returns the data, in the form of a CORBA::Any, from the given slot of the Current that is in the scope of the request. If the given slot has not been set, then an CORBA::Any containing a type code with a TCKind value of tk_null is returned.If the ID does not define an allocated slot, InvalidSlot is raised.

Parameters:
id - The SlotId of the slot from which the data will be returned.
Throws:
InvalidSlot - The supplied SlotId is invalid

forward_reference

Object forward_reference()
If the reply_status() returns LOCATION_FORWARD, then this method returns an object to which the request will be forwarded. It is indeterminate whether a forwarded request will actually occur.


reply_status

short reply_status()
This method returns an attribute which describes the state of the result of the operation invocation. Its value can be one of the following:

On the client:

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.

On the server:

SUCCESSFUL means an asynchronous request returned successfully.

LOCATION_FORWARD means that a reply came back with LOCATION_FORWARD as its status.


sync_scope

short sync_scope()
This method returns an attribute, defined in the Messaging specification, is pertinent only when response_expected is false. If response_expected is true, the value of sync_scope() is undefined. It defines how far the request will progress before control is returned to the client. This attribute may have one of the following values:

On the server, for all scopes, a reply will be created from the return of the target operation call, but the reply will not return to the client. Although it does not return to the client, it does occur, so the normal server side interception points are followed (i.e., 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.


response_expected

boolean response_expected()
This method returns a boolean value which 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.


result

Any result()
This method returns the data, in the form of CORBA::Any, that contains the result of the operation invocation. If the operation return type is void, this attribute will be a CORBA::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 raised with a standard minor code of 1.


operation_context

java.lang.String[] operation_context()
This method returns an array of java.lang.String 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 raised with standard minor code of 1.


contexts

java.lang.String[] contexts()
This method returns an array of java.lang.String describing the contexts that may be passed on this operation invocation. If there are no contexts,this attribute will be a zero length sequence. 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 raised with a standard minor code of 1.


exceptions

TypeCode[] exceptions()
This method returns an array of type CORBA::TypeCode describing the TypeCodes of the user exceptions that this operation invocation may raise. If there are no user exceptions, this attribute will be a zero length sequence.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 raised with a standard minor code of 1.


arguments

Parameter[] arguments()
This method returns an array of type Parameter containing the arguments on the operation being invoked. If there are no arguments, this attribute will be a zero length sequence. 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 raised with a standard minor code of 1.


operation

java.lang.String operation()
This method returns name of the operation being invoked.


request_id

int request_id()
This method returns the ID which uniquely identifies an active request / reply sequence. Once a request / reply sequence is concluded this ID may be reused. 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.


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