Class ServerRequestImpl
- java.lang.Object
-
- org.omg.CORBA.ServerRequest
-
- com.sun.corba.ee.impl.corba.ServerRequestImpl
-
public class ServerRequestImpl extends ServerRequest
-
-
Field Summary
Fields Modifier and Type Field Description private NVList
_arguments
private Context
_ctx
private Any
_exception
private boolean
_exceptionSet
private InputStream
_ins
private java.lang.String
_opName
private ORB
_orb
private boolean
_paramsCalled
private Any
_resultAny
private boolean
_resultSet
private static ORBUtilSystemException
_wrapper
-
Constructor Summary
Constructors Constructor Description ServerRequestImpl(MessageMediator req, ORB orb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
arguments(NVList args)
Specifies method parameter types and retrieves "in" and "inout" argument values.Any
checkResultCalled()
This is called from the ORB after the DynamicImplementation.invoke returns.Context
ctx()
Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nilContext
reference.void
marshalReplyParams(OutputStream os)
This is called from the ORB after the DynamicImplementation.invoke returns.java.lang.String
operation()
Throws anorg.omg.CORBA.NO_IMPLEMENT
exception.void
set_exception(Any exc)
Throws anorg.omg.CORBA.NO_IMPLEMENT
exception.void
set_result(Any res)
Throws anorg.omg.CORBA.NO_IMPLEMENT
exception.-
Methods inherited from class org.omg.CORBA.ServerRequest
except, op_name, params, result
-
-
-
-
Field Detail
-
_wrapper
private static final ORBUtilSystemException _wrapper
-
_orb
private ORB _orb
-
_opName
private java.lang.String _opName
-
_arguments
private NVList _arguments
-
_ctx
private Context _ctx
-
_ins
private InputStream _ins
-
_paramsCalled
private boolean _paramsCalled
-
_resultSet
private boolean _resultSet
-
_exceptionSet
private boolean _exceptionSet
-
_resultAny
private Any _resultAny
-
_exception
private Any _exception
-
-
Constructor Detail
-
ServerRequestImpl
public ServerRequestImpl(MessageMediator req, ORB orb)
-
-
Method Detail
-
operation
public java.lang.String operation()
Description copied from class:ServerRequest
Throws anorg.omg.CORBA.NO_IMPLEMENT
exception.Retrieves the name of the operation being invoked. According to OMG IDL's rules, these names must be unique among all operations supported by this object's "most-derived" interface. Note that the operation names for getting and setting attributes are
_get_<attribute_name>
and_set_<attribute_name>
, respectively.- Overrides:
operation
in classServerRequest
- Returns:
- the name of the operation to be invoked
- See Also:
CORBA
package comments for unimplemented features
-
arguments
public void arguments(NVList args)
Description copied from class:ServerRequest
Specifies method parameter types and retrieves "in" and "inout" argument values. Unless it calls the methodset_exception
, the DIR must call this method exactly once, even if the method signature contains no parameters. Once the methodarguments
orset_exception
has been called, callingarguments
on the sameServerRequest
object will result in aBAD_INV_ORDER
system exception. The DIR must pass in to the methodarguments
an NVList initialized with TypeCodes and Flags describing the parameter types for the operation, in the order in which they appear in the IDL specification (left to right). A potentially-different NVList will be returned fromarguments
, with the "in" and "inout" argument values supplied. If it does not call the methodset_exception
, the DIR must supply the returned NVList with return values for any "out" arguments before returning, and it may also change the return values for any "inout" arguments.- Overrides:
arguments
in classServerRequest
- Parameters:
args
- the arguments of the method, in the form of an NVList- See Also:
CORBA
package comments for unimplemented features
-
set_result
public void set_result(Any res)
Description copied from class:ServerRequest
Throws anorg.omg.CORBA.NO_IMPLEMENT
exception.Specifies any return value for the call. Unless the method
set_exception
is called, if the invoked method has a non-void result type, the methodset_result
must be called exactly once before the DIR returns. If the operation has a void result type, the methodset_result
may optionally be called once with anAny
object whose type istk_void
. Calling the methodset_result
before the methodarguments
has been called or after the methodset_result
orset_exception
has been called will result in a BAD_INV_ORDER exception. Calling the methodset_result
without having previously called the methodctx
when the IDL operation contains a context expression, or when the NVList passed to arguments did not describe all parameters passed by the client, may result in a MARSHAL system exception.- Overrides:
set_result
in classServerRequest
- Parameters:
res
- anAny
object containing the return value to be set- See Also:
CORBA
package comments for unimplemented features
-
set_exception
public void set_exception(Any exc)
Description copied from class:ServerRequest
Throws anorg.omg.CORBA.NO_IMPLEMENT
exception.Returns the given exception to the client. This method is invoked by the DIR, which may call it at any time. The
Any
object passed to this method must contain either a system exception or one of the user exceptions specified in the invoked operation's IDL definition. Passing in anAny
object that does not contain an exception will cause a BAD_PARAM system exception to be thrown. Passing in an unlisted user exception will result in either the DIR receiving a BAD_PARAM system exception or in the client receiving an UNKNOWN_EXCEPTION system exception.- Overrides:
set_exception
in classServerRequest
- Parameters:
exc
- theAny
object containing the exception- See Also:
CORBA
package comments for unimplemented features
-
checkResultCalled
public Any checkResultCalled()
This is called from the ORB after the DynamicImplementation.invoke returns. Here we set the result if result() has not already been called.- Returns:
- the exception if there is one (then ORB will not call marshalReplyParams()) otherwise return null.
-
marshalReplyParams
public void marshalReplyParams(OutputStream os)
This is called from the ORB after the DynamicImplementation.invoke returns. Here we marshal the return value and inout/out params.- Parameters:
os
- OutputStream into which to marshal the parameters
-
ctx
public Context ctx()
Description copied from class:ServerRequest
Returns the context information specified in IDL for the operation when the operation is not an attribute access and the operation's IDL definition contains a context expression; otherwise it returns a nilContext
reference. Calling the methodctx
before the methodarguments
has been called or after the methodctx
,set_result
, orset_exception
has been called will result in a BAD_INV_ORDER system exception.- Specified by:
ctx
in classServerRequest
- Returns:
- the context object that is to be used to resolve any context strings whose values need to be sent with the invocation.
-
-