FileDocCategorySizeDatePackage
Request.javaAPI DocJava SE 5 API9095Fri Aug 26 14:58:32 BST 2005org.omg.CORBA

Request

public abstract class Request extends Object
An object containing the information necessary for invoking a method. This class is the cornerstone of the ORB Dynamic Invocation Interface (DII), which allows dynamic creation and invocation of requests. A server cannot tell the difference between a client invocation using a client stub and a request using the DII.

A Request object consists of:

  • the name of the operation to be invoked
  • an NVList containing arguments for the operation.
    Each item in the list is a NamedValue object, which has three parts:
    1. the name of the argument
    2. the value of the argument (as an Any object)
    3. the argument mode flag indicating whether the argument is for input, output, or both

Request objects may also contain additional information, depending on how an operation was defined in the original IDL interface definition. For example, where appropriate, they may contain a NamedValue object to hold the return value or exception, a context, a list of possible exceptions, and a list of context strings that need to be resolved.

New Request objects are created using one of the create_request methods in the Object class. In other words, a create_request method is performed on the object which is to be invoked.

see
org.omg.CORBA.NamedValue
version
1.13 09/09/97

Fields Summary
Constructors Summary
Methods Summary
public abstract Anyadd_in_arg()
Creates an input argument and adds it to this Request object.

return
an Any object that contains the value and typecode for the input argument added

public abstract Anyadd_inout_arg()
Adds an input/output argument to this Request object.

return
an Any object that contains the value and typecode for the input/output argument added

public abstract Anyadd_named_in_arg(java.lang.String name)
Creates an input argument with the given name and adds it to this Request object.

param
name the name of the argument being added
return
an Any object that contains the value and typecode for the input argument added

public abstract Anyadd_named_inout_arg(java.lang.String name)
Adds an input/output argument with the given name to this Request object.

param
name the name of the argument being added
return
an Any object that contains the value and typecode for the input/output argument added

public abstract Anyadd_named_out_arg(java.lang.String name)
Adds an output argument with the given name to this Request object.

param
name the name of the argument being added
return
an Any object that contains the value and typecode for the output argument added

public abstract Anyadd_out_arg()
Adds an output argument to this Request object.

return
an Any object that contains the value and typecode for the output argument added

public abstract NVListarguments()
Retrieves the NVList object containing the arguments to the method being invoked. The elements in the list are NamedValue objects, with each one describing an argument to the method.

return
the NVList object containing the arguments for the method

public abstract ContextListcontexts()
Retrieves the ContextList object for this request. This list contains context Strings that need to be resolved and sent with the invocation.

return
the list of context strings whose values need to be resolved and sent with the invocation.

public abstract Contextctx()
Retrieves the Context object for this request. This is a list of properties giving information about the client, the environment, or the circumstances of this request.

return
the Context object that is to be used to resolve any context strings whose values need to be sent with the invocation

public abstract voidctx(Context c)
Sets this request's Context object to the one given.

param
c the new Context object to be used for resolving context strings

public abstract Environmentenv()
Retrieves the Environment object for this request. It contains the exception that the method being invoked has thrown (after the invocation returns).

return
the Environment object for this request

public abstract ExceptionListexceptions()
Retrieves the ExceptionList object for this request. This list contains TypeCode objects describing the exceptions that may be thrown by the method being invoked.

return
the ExceptionList object describing the exceptions that may be thrown by the method being invoked

public abstract voidget_response()
Allows the user to access the response for the invocation triggered earlier with the send_deferred method.

exception
WrongTransaction if the method get_response was invoked from a different transaction's scope than the one from which the request was originally sent. See the OMG Transaction Service specification for details.

public abstract voidinvoke()
Makes a synchronous invocation using the information in the Request object. Exception information is placed into the Request object's environment object.

public abstract java.lang.Stringoperation()
Retrieves the name of the method to be invoked.

return
the name of the method to be invoked

public abstract booleanpoll_response()
Allows the user to determine whether a response has been received for the invocation triggered earlier with the send_deferred method.

return
true if the method response has been received; false otherwise

public abstract NamedValueresult()
Retrieves the NamedValue object containing the return value for the method.

return
the NamedValue object containing the result of the method

public abstract Anyreturn_value()
Returns the Any object that contains the value for the result of the method.

return
an Any object containing the value and typecode for the return value

public abstract voidsend_deferred()
Makes an asynchronous invocation on the request. In other words, it does not wait for a response before it returns to the user. The user can then later use the methods poll_response and get_response to get the result or exception information for the invocation.

public abstract voidsend_oneway()
Makes a oneway invocation on the request. In other words, it does not expect or wait for a response. Note that this can be used even if the operation was not declared as oneway in the IDL declaration. No response or exception information is returned.

public abstract voidset_return_type(TypeCode tc)
Sets the typecode for the return value of the method.

param
tc the TypeCode object containing type information for the return value

public abstract org.omg.CORBA.Objecttarget()
Retrieves the the target object reference.

return
the object reference that points to the object implementation for the method to be invoked