Package com.sun.corba.ee.impl.corba
Class RequestImpl
- java.lang.Object
-
- org.omg.CORBA.Request
-
- com.sun.corba.ee.impl.corba.RequestImpl
-
public class RequestImpl extends Request
-
-
Field Summary
Fields Modifier and Type Field Description protected NVList
_arguments
private Context
_ctx
private ContextList
_ctxList
protected Environment
_env
protected ExceptionList
_exceptions
protected boolean
_isOneWay
protected java.lang.String
_opName
protected ORB
_orb
private int[]
_paramCodes
private long[]
_paramLongs
private java.lang.Object[]
_paramObjects
private NamedValue
_result
protected Object
_target
private static ORBUtilSystemException
_wrapper
protected boolean
gotResponse
-
Constructor Summary
Constructors Constructor Description RequestImpl(ORB orb, Object targetObject, Context ctx, java.lang.String operationName, NVList argumentList, NamedValue resultContainer, ExceptionList exceptionList, ContextList ctxList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add_exception(TypeCode exceptionType)
Any
add_in_arg()
Creates an input argument and adds it to thisRequest
object.Any
add_inout_arg()
Adds an input/output argument to thisRequest
object.Any
add_named_in_arg(java.lang.String name)
Creates an input argument with the given name and adds it to thisRequest
object.Any
add_named_inout_arg(java.lang.String name)
Adds an input/output argument with the given name to thisRequest
object.Any
add_named_out_arg(java.lang.String name)
Adds an output argument with the given name to thisRequest
object.Any
add_out_arg()
Adds an output argument to thisRequest
object.NVList
arguments()
Retrieves theNVList
object containing the arguments to the method being invoked.ContextList
contexts()
Retrieves theContextList
object for this request.Context
ctx()
Retrieves theContext
object for this request.void
ctx(Context newCtx)
Sets this request'sContext
object to the one given.protected void
doInvocation()
Environment
env()
Retrieves theEnvironment
object for this request.ExceptionList
exceptions()
Retrieves theExceptionList
object for this request.void
get_response()
Allows the user to access the response for the invocation triggered earlier with thesend_deferred
method.void
invoke()
Makes a synchronous invocation using the information in theRequest
object.java.lang.String
operation()
Retrieves the name of the method to be invoked.boolean
poll_response()
Allows the user to determine whether a response has been received for the invocation triggered earlier with thesend_deferred
method.NamedValue
result()
Retrieves theNamedValue
object containing the return value for the method.Any
return_value()
Returns theAny
object that contains the value for the result of the method.void
send_deferred()
Makes an asynchronous invocation on the request.void
send_oneway()
Makes a oneway invocation on the request.void
set_return_type(TypeCode tc)
Sets the typecode for the return value of the method.Object
target()
Retrieves the the target object reference.void
unmarshalReply(InputStream is)
-
-
-
Field Detail
-
_target
protected Object _target
-
_opName
protected java.lang.String _opName
-
_arguments
protected NVList _arguments
-
_exceptions
protected ExceptionList _exceptions
-
_result
private NamedValue _result
-
_env
protected Environment _env
-
_ctx
private Context _ctx
-
_ctxList
private ContextList _ctxList
-
_orb
protected ORB _orb
-
_wrapper
private static final ORBUtilSystemException _wrapper
-
_isOneWay
protected boolean _isOneWay
-
_paramCodes
private int[] _paramCodes
-
_paramLongs
private long[] _paramLongs
-
_paramObjects
private java.lang.Object[] _paramObjects
-
gotResponse
protected boolean gotResponse
-
-
Constructor Detail
-
RequestImpl
public RequestImpl(ORB orb, Object targetObject, Context ctx, java.lang.String operationName, NVList argumentList, NamedValue resultContainer, ExceptionList exceptionList, ContextList ctxList)
-
-
Method Detail
-
target
public Object target()
Description copied from class:Request
Retrieves the the target object reference.
-
operation
public java.lang.String operation()
Description copied from class:Request
Retrieves the name of the method to be invoked.
-
arguments
public NVList arguments()
Description copied from class:Request
Retrieves theNVList
object containing the arguments to the method being invoked. The elements in the list areNamedValue
objects, with each one describing an argument to the method.
-
result
public NamedValue result()
Description copied from class:Request
Retrieves theNamedValue
object containing the return value for the method.
-
env
public Environment env()
Description copied from class:Request
Retrieves theEnvironment
object for this request. It contains the exception that the method being invoked has thrown (after the invocation returns).
-
exceptions
public ExceptionList exceptions()
Description copied from class:Request
Retrieves theExceptionList
object for this request. This list containsTypeCode
objects describing the exceptions that may be thrown by the method being invoked.- Specified by:
exceptions
in classRequest
- Returns:
- the
ExceptionList
object describing the exceptions that may be thrown by the method being invoked
-
contexts
public ContextList contexts()
Description copied from class:Request
Retrieves theContextList
object for this request. This list contains contextString
s that need to be resolved and sent with the invocation.
-
ctx
public Context ctx()
Description copied from class:Request
Retrieves theContext
object for this request. This is a list of properties giving information about the client, the environment, or the circumstances of this request.
-
ctx
public void ctx(Context newCtx)
Description copied from class:Request
Sets this request'sContext
object to the one given.
-
add_in_arg
public Any add_in_arg()
Description copied from class:Request
Creates an input argument and adds it to thisRequest
object.- Specified by:
add_in_arg
in classRequest
- Returns:
- an
Any
object that contains the value and typecode for the input argument added
-
add_named_in_arg
public Any add_named_in_arg(java.lang.String name)
Description copied from class:Request
Creates an input argument with the given name and adds it to thisRequest
object.- Specified by:
add_named_in_arg
in classRequest
- 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
public Any add_inout_arg()
Description copied from class:Request
Adds an input/output argument to thisRequest
object.- Specified by:
add_inout_arg
in classRequest
- Returns:
- an
Any
object that contains the value and typecode for the input/output argument added
-
add_named_inout_arg
public Any add_named_inout_arg(java.lang.String name)
Description copied from class:Request
Adds an input/output argument with the given name to thisRequest
object.- Specified by:
add_named_inout_arg
in classRequest
- 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
public Any add_out_arg()
Description copied from class:Request
Adds an output argument to thisRequest
object.- Specified by:
add_out_arg
in classRequest
- Returns:
- an
Any
object that contains the value and typecode for the output argument added
-
add_named_out_arg
public Any add_named_out_arg(java.lang.String name)
Description copied from class:Request
Adds an output argument with the given name to thisRequest
object.- Specified by:
add_named_out_arg
in classRequest
- 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
public void set_return_type(TypeCode tc)
Description copied from class:Request
Sets the typecode for the return value of the method.- Specified by:
set_return_type
in classRequest
- Parameters:
tc
- theTypeCode
object containing type information for the return value
-
return_value
public Any return_value()
Description copied from class:Request
Returns theAny
object that contains the value for the result of the method.- Specified by:
return_value
in classRequest
- Returns:
- an
Any
object containing the value and typecode for the return value
-
add_exception
public void add_exception(TypeCode exceptionType)
-
invoke
public void invoke()
Description copied from class:Request
Makes a synchronous invocation using the information in theRequest
object. Exception information is placed into theRequest
object's environment object.
-
send_oneway
public void send_oneway()
Description copied from class:Request
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.- Specified by:
send_oneway
in classRequest
-
send_deferred
public void send_deferred()
Description copied from class:Request
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 methodspoll_response
andget_response
to get the result or exception information for the invocation.- Specified by:
send_deferred
in classRequest
-
poll_response
public boolean poll_response()
Description copied from class:Request
Allows the user to determine whether a response has been received for the invocation triggered earlier with thesend_deferred
method.- Specified by:
poll_response
in classRequest
- Returns:
true
if the method response has been received;false
otherwise
-
get_response
public void get_response() throws WrongTransaction
Description copied from class:Request
Allows the user to access the response for the invocation triggered earlier with thesend_deferred
method.- Specified by:
get_response
in classRequest
- Throws:
WrongTransaction
- if the methodget_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.
-
doInvocation
protected void doInvocation()
-
unmarshalReply
public void unmarshalReply(InputStream is)
-
-