|
VisiBroker for Java |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
ServiceContext get_reply_service_context(int id)
BAD_PARAM
with a standard minor code of 26 is raised.
id
- The ID of the service context to be returned.ServiceContext get_request_service_context(int id)
BAD_PARAM
with a standard minor code of 26 is raised.
id
- The ID of the service context to be returned.Any get_slot(int id) throws InvalidSlot
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.
id
- The SlotId
of the slot from which the data will be returned.
InvalidSlot
- The supplied SlotId is invalidObject forward_reference()
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.
short reply_status()
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.
short sync_scope()
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.
boolean response_expected()
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.
Any result()
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.
java.lang.String[] operation_context()
NO_RESOURCES
will be raised with standard minor code of 1.
java.lang.String[] contexts()
NO_RESOURCES
will be raised with a standard minor code of 1.
TypeCode[] exceptions()
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.
Parameter[] arguments()
NO_RESOURCES
will be raised
with a standard minor code of 1.
java.lang.String operation()
int request_id()
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.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |