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_argumentsprivate Context_ctxprivate ContextList_ctxListprotected Environment_envprotected ExceptionList_exceptionsprotected boolean_isOneWayprotected java.lang.String_opNameprotected ORB_orbprivate int[]_paramCodesprivate long[]_paramLongsprivate java.lang.Object[]_paramObjectsprivate NamedValue_resultprotected Object_targetprivate static ORBUtilSystemException_wrapperprotected booleangotResponse
-
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 voidadd_exception(TypeCode exceptionType)Anyadd_in_arg()Creates an input argument and adds it to thisRequestobject.Anyadd_inout_arg()Adds an input/output argument to thisRequestobject.Anyadd_named_in_arg(java.lang.String name)Creates an input argument with the given name and adds it to thisRequestobject.Anyadd_named_inout_arg(java.lang.String name)Adds an input/output argument with the given name to thisRequestobject.Anyadd_named_out_arg(java.lang.String name)Adds an output argument with the given name to thisRequestobject.Anyadd_out_arg()Adds an output argument to thisRequestobject.NVListarguments()Retrieves theNVListobject containing the arguments to the method being invoked.ContextListcontexts()Retrieves theContextListobject for this request.Contextctx()Retrieves theContextobject for this request.voidctx(Context newCtx)Sets this request'sContextobject to the one given.protected voiddoInvocation()Environmentenv()Retrieves theEnvironmentobject for this request.ExceptionListexceptions()Retrieves theExceptionListobject for this request.voidget_response()Allows the user to access the response for the invocation triggered earlier with thesend_deferredmethod.voidinvoke()Makes a synchronous invocation using the information in theRequestobject.java.lang.Stringoperation()Retrieves the name of the method to be invoked.booleanpoll_response()Allows the user to determine whether a response has been received for the invocation triggered earlier with thesend_deferredmethod.NamedValueresult()Retrieves theNamedValueobject containing the return value for the method.Anyreturn_value()Returns theAnyobject that contains the value for the result of the method.voidsend_deferred()Makes an asynchronous invocation on the request.voidsend_oneway()Makes a oneway invocation on the request.voidset_return_type(TypeCode tc)Sets the typecode for the return value of the method.Objecttarget()Retrieves the the target object reference.voidunmarshalReply(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:RequestRetrieves the the target object reference.
-
operation
public java.lang.String operation()
Description copied from class:RequestRetrieves the name of the method to be invoked.
-
arguments
public NVList arguments()
Description copied from class:RequestRetrieves theNVListobject containing the arguments to the method being invoked. The elements in the list areNamedValueobjects, with each one describing an argument to the method.
-
result
public NamedValue result()
Description copied from class:RequestRetrieves theNamedValueobject containing the return value for the method.
-
env
public Environment env()
Description copied from class:RequestRetrieves theEnvironmentobject 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:RequestRetrieves theExceptionListobject for this request. This list containsTypeCodeobjects describing the exceptions that may be thrown by the method being invoked.- Specified by:
exceptionsin classRequest- Returns:
- the
ExceptionListobject describing the exceptions that may be thrown by the method being invoked
-
contexts
public ContextList contexts()
Description copied from class:RequestRetrieves theContextListobject for this request. This list contains contextStrings that need to be resolved and sent with the invocation.
-
ctx
public Context ctx()
Description copied from class:RequestRetrieves theContextobject 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:RequestSets this request'sContextobject to the one given.
-
add_in_arg
public Any add_in_arg()
Description copied from class:RequestCreates an input argument and adds it to thisRequestobject.- Specified by:
add_in_argin classRequest- Returns:
- an
Anyobject 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:RequestCreates an input argument with the given name and adds it to thisRequestobject.- Specified by:
add_named_in_argin classRequest- Parameters:
name- the name of the argument being added- Returns:
- an
Anyobject that contains the value and typecode for the input argument added
-
add_inout_arg
public Any add_inout_arg()
Description copied from class:RequestAdds an input/output argument to thisRequestobject.- Specified by:
add_inout_argin classRequest- Returns:
- an
Anyobject 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:RequestAdds an input/output argument with the given name to thisRequestobject.- Specified by:
add_named_inout_argin classRequest- Parameters:
name- the name of the argument being added- Returns:
- an
Anyobject that contains the value and typecode for the input/output argument added
-
add_out_arg
public Any add_out_arg()
Description copied from class:RequestAdds an output argument to thisRequestobject.- Specified by:
add_out_argin classRequest- Returns:
- an
Anyobject 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:RequestAdds an output argument with the given name to thisRequestobject.- Specified by:
add_named_out_argin classRequest- Parameters:
name- the name of the argument being added- Returns:
- an
Anyobject 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:RequestSets the typecode for the return value of the method.- Specified by:
set_return_typein classRequest- Parameters:
tc- theTypeCodeobject containing type information for the return value
-
return_value
public Any return_value()
Description copied from class:RequestReturns theAnyobject that contains the value for the result of the method.- Specified by:
return_valuein classRequest- Returns:
- an
Anyobject 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:RequestMakes a synchronous invocation using the information in theRequestobject. Exception information is placed into theRequestobject's environment object.
-
send_oneway
public void send_oneway()
Description copied from class:RequestMakes 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_onewayin classRequest
-
send_deferred
public void send_deferred()
Description copied from class:RequestMakes 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_responseandget_responseto get the result or exception information for the invocation.- Specified by:
send_deferredin classRequest
-
poll_response
public boolean poll_response()
Description copied from class:RequestAllows the user to determine whether a response has been received for the invocation triggered earlier with thesend_deferredmethod.- Specified by:
poll_responsein classRequest- Returns:
trueif the method response has been received;falseotherwise
-
get_response
public void get_response() throws WrongTransactionDescription copied from class:RequestAllows the user to access the response for the invocation triggered earlier with thesend_deferredmethod.- Specified by:
get_responsein classRequest- Throws:
WrongTransaction- if the methodget_responsewas 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)
-
-