Class ReflectiveTie
- java.lang.Object
-
- org.omg.PortableServer.Servant
-
- com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie
-
- All Implemented Interfaces:
Tie,InvokeHandler
public final class ReflectiveTie extends Servant implements Tie
-
-
Field Summary
Fields Modifier and Type Field Description private PresentationManager.ClassDataclassDataprivate PresentationManagerpmprivate java.rmi.Remotetargetprivate static ORBUtilSystemExceptionwrapper
-
Constructor Summary
Constructors Constructor Description ReflectiveTie(PresentationManager pm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]_all_interfaces(POA poa, byte[] objectId)Used by the ORB to obtain complete type information from the servant.OutputStream_invoke(java.lang.String method, InputStream _in, ResponseHandler reply)Invoked by the ORB to dispatch a request to the servant.voiddeactivate()Deactivates the target object represented by this tie.java.lang.ObjectdispatchToMethod(java.lang.reflect.Method javaMethod, java.rmi.Remote target, java.lang.Object[] args)java.rmi.RemotegetTarget()Returns the target for this tie.ORBorb()Returns the ORB for this tie.voidorb(ORB orb)Sets the ORB for this tie.voidsetTarget(java.rmi.Remote target)Called byUtil.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote)to set the target for this tie.ObjectthisObject()Returns an object reference for the target object represented by this tie.-
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
-
-
-
-
Field Detail
-
wrapper
private static final ORBUtilSystemException wrapper
-
target
private java.rmi.Remote target
-
pm
private PresentationManager pm
-
classData
private PresentationManager.ClassData classData
-
-
Constructor Detail
-
ReflectiveTie
public ReflectiveTie(PresentationManager pm)
-
-
Method Detail
-
_all_interfaces
public java.lang.String[] _all_interfaces(POA poa, byte[] objectId)
Description copied from class:ServantUsed by the ORB to obtain complete type information from the servant.- Specified by:
_all_interfacesin classServant- Parameters:
poa- POA with which the servant is associated.objectId- is the id corresponding to the object associated with this servant.- Returns:
- list of type information for the object.
-
setTarget
public void setTarget(java.rmi.Remote target)
Description copied from interface:TieCalled byUtil.registerTarget(javax.rmi.CORBA.Tie, java.rmi.Remote)to set the target for this tie.
-
getTarget
public java.rmi.Remote getTarget()
Description copied from interface:TieReturns the target for this tie.
-
thisObject
public Object thisObject()
Description copied from interface:TieReturns an object reference for the target object represented by this tie.- Specified by:
thisObjectin interfaceTie- Returns:
- an object reference for the target object.
-
deactivate
public void deactivate()
Description copied from interface:TieDeactivates the target object represented by this tie.- Specified by:
deactivatein interfaceTie
-
dispatchToMethod
public java.lang.Object dispatchToMethod(java.lang.reflect.Method javaMethod, java.rmi.Remote target, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException- Throws:
java.lang.reflect.InvocationTargetException
-
_invoke
public OutputStream _invoke(java.lang.String method, InputStream _in, ResponseHandler reply)
Description copied from interface:InvokeHandlerInvoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:1. Determine correct method, and unmarshal parameters from InputStream.
2. Invoke method implementation.
3. If no user exception, create a normal reply using ResponseHandler.
4. If user exception occurred, create exception reply using ResponseHandler.
5. Marshal reply into OutputStream returned by ResponseHandler.
6. Return OutputStream to ORB.
- Specified by:
_invokein interfaceInvokeHandler- Parameters:
method- The method name._in- TheInputStreamcontaining the marshalled arguments.reply- TheResponseHandlerwhich the servant uses to construct a proper reply- Returns:
- The
OutputStreamcreated by the ResponseHandler which contains the marshalled reply
-
-