org.omg.CORBA
Class Request

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by org.omg.CORBA.Request

public abstract class Request
extends Object sample code for java.lang.Object definition code for java.lang.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:

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 Also:
NamedValue sample code for org.omg.CORBA.NamedValue definition code for org.omg.CORBA.NamedValue

Constructor Summary
Request sample code for org.omg.CORBA.Request.Request() definition code for org.omg.CORBA.Request.Request() ()
           
 
Method Summary
abstract  Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any add_in_arg sample code for org.omg.CORBA.Request.add_in_arg() definition code for org.omg.CORBA.Request.add_in_arg() ()
          Creates an input argument and adds it to this Request object.
abstract  Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any add_inout_arg sample code for org.omg.CORBA.Request.add_inout_arg() definition code for org.omg.CORBA.Request.add_inout_arg() ()
          Adds an input/output argument to this Request object.
abstract  Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any add_named_in_arg sample code for org.omg.CORBA.Request.add_named_in_arg(java.lang.String) definition code for org.omg.CORBA.Request.add_named_in_arg(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Creates an input argument with the given name and adds it to this Request object.
abstract  Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any add_named_inout_arg sample code for org.omg.CORBA.Request.add_named_inout_arg(java.lang.String) definition code for org.omg.CORBA.Request.add_named_inout_arg(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Adds an input/output argument with the given name to this Request object.
abstract  Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any add_named_out_arg sample code for org.omg.CORBA.Request.add_named_out_arg(java.lang.String) definition code for org.omg.CORBA.Request.add_named_out_arg(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Adds an output argument with the given name to this Request object.
abstract  Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any add_out_arg sample code for org.omg.CORBA.Request.add_out_arg() definition code for org.omg.CORBA.Request.add_out_arg() ()
          Adds an output argument to this Request object.
abstract  NVList sample code for org.omg.CORBA.NVList definition code for org.omg.CORBA.NVList arguments sample code for org.omg.CORBA.Request.arguments() definition code for org.omg.CORBA.Request.arguments() ()
          Retrieves the NVList object containing the arguments to the method being invoked.
abstract  ContextList sample code for org.omg.CORBA.ContextList definition code for org.omg.CORBA.ContextList contexts sample code for org.omg.CORBA.Request.contexts() definition code for org.omg.CORBA.Request.contexts() ()
          Retrieves the ContextList object for this request.
abstract  Context sample code for org.omg.CORBA.Context definition code for org.omg.CORBA.Context ctx sample code for org.omg.CORBA.Request.ctx() definition code for org.omg.CORBA.Request.ctx() ()
          Retrieves the Context object for this request.
abstract  void ctx sample code for org.omg.CORBA.Request.ctx(org.omg.CORBA.Context) definition code for org.omg.CORBA.Request.ctx(org.omg.CORBA.Context) (Context sample code for org.omg.CORBA.Context definition code for org.omg.CORBA.Context  c)
          Sets this request's Context object to the one given.
abstract  Environment sample code for org.omg.CORBA.Environment definition code for org.omg.CORBA.Environment env sample code for org.omg.CORBA.Request.env() definition code for org.omg.CORBA.Request.env() ()
          Retrieves the Environment object for this request.
abstract  ExceptionList sample code for org.omg.CORBA.ExceptionList definition code for org.omg.CORBA.ExceptionList exceptions sample code for org.omg.CORBA.Request.exceptions() definition code for org.omg.CORBA.Request.exceptions() ()
          Retrieves the ExceptionList object for this request.
abstract  void get_response sample code for org.omg.CORBA.Request.get_response() definition code for org.omg.CORBA.Request.get_response() ()
          Allows the user to access the response for the invocation triggered earlier with the send_deferred method.
abstract  void invoke sample code for org.omg.CORBA.Request.invoke() definition code for org.omg.CORBA.Request.invoke() ()
          Makes a synchronous invocation using the information in the Request object.
abstract  String sample code for java.lang.String definition code for java.lang.String operation sample code for org.omg.CORBA.Request.operation() definition code for org.omg.CORBA.Request.operation() ()
          Retrieves the name of the method to be invoked.
abstract  boolean poll_response sample code for org.omg.CORBA.Request.poll_response() definition code for org.omg.CORBA.Request.poll_response() ()
          Allows the user to determine whether a response has been received for the invocation triggered earlier with the send_deferred method.
abstract  NamedValue sample code for org.omg.CORBA.NamedValue definition code for org.omg.CORBA.NamedValue result sample code for org.omg.CORBA.Request.result() definition code for org.omg.CORBA.Request.result() ()
          Retrieves the NamedValue object containing the return value for the method.
abstract  Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any return_value sample code for org.omg.CORBA.Request.return_value() definition code for org.omg.CORBA.Request.return_value() ()
          Returns the Any object that contains the value for the result of the method.
abstract  void send_deferred sample code for org.omg.CORBA.Request.send_deferred() definition code for org.omg.CORBA.Request.send_deferred() ()
          Makes an asynchronous invocation on the request.
abstract  void send_oneway sample code for org.omg.CORBA.Request.send_oneway() definition code for org.omg.CORBA.Request.send_oneway() ()
          Makes a oneway invocation on the request.
abstract  void set_return_type sample code for org.omg.CORBA.Request.set_return_type(org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Request.set_return_type(org.omg.CORBA.TypeCode) (TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  tc)
          Sets the typecode for the return value of the method.
abstract  Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object target sample code for org.omg.CORBA.Request.target() definition code for org.omg.CORBA.Request.target() ()
          Retrieves the the target object reference.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Request sample code for org.omg.CORBA.Request() definition code for org.omg.CORBA.Request()

public Request()
Method Detail

target sample code for org.omg.CORBA.Request.target() definition code for org.omg.CORBA.Request.target()

public abstract Object sample code for org.omg.CORBA.Object definition code for org.omg.CORBA.Object  target()
Retrieves the the target object reference.

Returns:
the object reference that points to the object implementation for the method to be invoked

operation sample code for org.omg.CORBA.Request.operation() definition code for org.omg.CORBA.Request.operation()

public abstract String sample code for java.lang.String definition code for java.lang.String  operation()
Retrieves the name of the method to be invoked.

Returns:
the name of the method to be invoked

arguments sample code for org.omg.CORBA.Request.arguments() definition code for org.omg.CORBA.Request.arguments()

public abstract NVList sample code for org.omg.CORBA.NVList definition code for org.omg.CORBA.NVList  arguments()
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.

Returns:
the NVList object containing the arguments for the method

result sample code for org.omg.CORBA.Request.result() definition code for org.omg.CORBA.Request.result()

public abstract NamedValue sample code for org.omg.CORBA.NamedValue definition code for org.omg.CORBA.NamedValue  result()
Retrieves the NamedValue object containing the return value for the method.

Returns:
the NamedValue object containing the result of the method

env sample code for org.omg.CORBA.Request.env() definition code for org.omg.CORBA.Request.env()

public abstract Environment sample code for org.omg.CORBA.Environment definition code for org.omg.CORBA.Environment  env()
Retrieves the Environment object for this request. It contains the exception that the method being invoked has thrown (after the invocation returns).

Returns:
the Environment object for this request

exceptions sample code for org.omg.CORBA.Request.exceptions() definition code for org.omg.CORBA.Request.exceptions()

public abstract ExceptionList sample code for org.omg.CORBA.ExceptionList definition code for org.omg.CORBA.ExceptionList  exceptions()
Retrieves the ExceptionList object for this request. This list contains TypeCode objects describing the exceptions that may be thrown by the method being invoked.

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

contexts sample code for org.omg.CORBA.Request.contexts() definition code for org.omg.CORBA.Request.contexts()

public abstract ContextList sample code for org.omg.CORBA.ContextList definition code for org.omg.CORBA.ContextList  contexts()
Retrieves the ContextList object for this request. This list contains context Strings that need to be resolved and sent with the invocation.

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

ctx sample code for org.omg.CORBA.Request.ctx() definition code for org.omg.CORBA.Request.ctx()

public abstract Context sample code for org.omg.CORBA.Context definition code for org.omg.CORBA.Context  ctx()
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.

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

ctx sample code for org.omg.CORBA.Request.ctx(org.omg.CORBA.Context) definition code for org.omg.CORBA.Request.ctx(org.omg.CORBA.Context)

public abstract void ctx(Context sample code for org.omg.CORBA.Context definition code for org.omg.CORBA.Context  c)
Sets this request's Context object to the one given.

Parameters:
c - the new Context object to be used for resolving context strings

add_in_arg sample code for org.omg.CORBA.Request.add_in_arg() definition code for org.omg.CORBA.Request.add_in_arg()

public abstract Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  add_in_arg()
Creates an input argument and adds it to this Request object.

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

add_named_in_arg sample code for org.omg.CORBA.Request.add_named_in_arg(java.lang.String) definition code for org.omg.CORBA.Request.add_named_in_arg(java.lang.String)

public abstract Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  add_named_in_arg(String sample code for java.lang.String definition code for java.lang.String  name)
Creates an input argument with the given name and adds it to this Request object.

Parameters:
name - the name of the argument being added
Returns:
an Any object that contains the value and typecode for the input argument added

add_inout_arg sample code for org.omg.CORBA.Request.add_inout_arg() definition code for org.omg.CORBA.Request.add_inout_arg()

public abstract Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  add_inout_arg()
Adds an input/output argument to this Request object.

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

add_named_inout_arg sample code for org.omg.CORBA.Request.add_named_inout_arg(java.lang.String) definition code for org.omg.CORBA.Request.add_named_inout_arg(java.lang.String)

public abstract Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  add_named_inout_arg(String sample code for java.lang.String definition code for java.lang.String  name)
Adds an input/output argument with the given name to this Request object.

Parameters:
name - the name of the argument being added
Returns:
an Any object that contains the value and typecode for the input/output argument added

add_out_arg sample code for org.omg.CORBA.Request.add_out_arg() definition code for org.omg.CORBA.Request.add_out_arg()

public abstract Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  add_out_arg()
Adds an output argument to this Request object.

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

add_named_out_arg sample code for org.omg.CORBA.Request.add_named_out_arg(java.lang.String) definition code for org.omg.CORBA.Request.add_named_out_arg(java.lang.String)

public abstract Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  add_named_out_arg(String sample code for java.lang.String definition code for java.lang.String  name)
Adds an output argument with the given name to this Request object.

Parameters:
name - the name of the argument being added
Returns:
an Any object that contains the value and typecode for the output argument added

set_return_type sample code for org.omg.CORBA.Request.set_return_type(org.omg.CORBA.TypeCode) definition code for org.omg.CORBA.Request.set_return_type(org.omg.CORBA.TypeCode)

public abstract void set_return_type(TypeCode sample code for org.omg.CORBA.TypeCode definition code for org.omg.CORBA.TypeCode  tc)
Sets the typecode for the return value of the method.

Parameters:
tc - the TypeCode object containing type information for the return value

return_value sample code for org.omg.CORBA.Request.return_value() definition code for org.omg.CORBA.Request.return_value()

public abstract Any sample code for org.omg.CORBA.Any definition code for org.omg.CORBA.Any  return_value()
Returns the Any object that contains the value for the result of the method.

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

invoke sample code for org.omg.CORBA.Request.invoke() definition code for org.omg.CORBA.Request.invoke()

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


send_oneway sample code for org.omg.CORBA.Request.send_oneway() definition code for org.omg.CORBA.Request.send_oneway()

public abstract void send_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.


send_deferred sample code for org.omg.CORBA.Request.send_deferred() definition code for org.omg.CORBA.Request.send_deferred()

public abstract void send_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.


poll_response sample code for org.omg.CORBA.Request.poll_response() definition code for org.omg.CORBA.Request.poll_response()

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

Returns:
true if the method response has been received; false otherwise

get_response sample code for org.omg.CORBA.Request.get_response() definition code for org.omg.CORBA.Request.get_response()

public abstract void get_response()
                           throws WrongTransaction sample code for org.omg.CORBA.WrongTransaction definition code for org.omg.CORBA.WrongTransaction 
Allows the user to access the response for the invocation triggered earlier with the send_deferred method.

Throws:
WrongTransaction sample code for org.omg.CORBA.WrongTransaction definition code for org.omg.CORBA.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.