javax.rmi
Class PortableRemoteObject
java.lang.Object
|
+--javax.rmi.PortableRemoteObject
- public class PortableRemoteObject
- extends java.lang.Object
This class is intended to act as a base class for RMI/IDL server implementation classes.
- Version:
- $Revision: 1.3 $ $Date: 2004/02/10 21:02:52 $
- Author:
- Jerome Daniel
|
Constructor Summary |
protected |
PortableRemoteObject()
This constructor is called by the derived implementation class to initialize the
base class state |
|
Method Summary |
static void |
connect(java.rmi.Remote target,
java.rmi.Remote source)
This method makes the remote object target ready for remote communication using the
same communications runtime as source. |
static void |
exportObject(java.rmi.Remote obj)
A call to this method with no objects exported creates a non-daemon thread wich keeps the
java virtual machine alive until all exported objects have been unexported by calling
unexportObject. |
static java.lang.Object |
narrow(java.lang.Object obj,
java.lang.Class newClass)
This method takes an object reference or an object of an RMI/IDL abstract interface type
and attemps to narrow it to conform to the given newClass RMI/IDL type. |
static java.rmi.Remote |
toStub(java.rmi.Remote obj)
This method takes a server implementation object and returns a stubobject that can
be used to access that server object. |
static void |
unexportObject(java.rmi.Remote obj)
This method is used to deregister a currently exported server object from the ORB
runtimes, allowing the object to become available for garbage collection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PortableRemoteObject
protected PortableRemoteObject()
throws java.rmi.RemoteException
- This constructor is called by the derived implementation class to initialize the
base class state
exportObject
public static void exportObject(java.rmi.Remote obj)
throws java.rmi.RemoteException
- A call to this method with no objects exported creates a non-daemon thread wich keeps the
java virtual machine alive until all exported objects have been unexported by calling
unexportObject.
toStub
public static java.rmi.Remote toStub(java.rmi.Remote obj)
throws java.rmi.NoSuchObjectException
- This method takes a server implementation object and returns a stubobject that can
be used to access that server object. The argument object must currently be exported,
either because it is a subclass f PortableRemoteObject or be virtue of a previous call
to PortableRemoteObject.exportObject.
unexportObject
public static void unexportObject(java.rmi.Remote obj)
throws java.rmi.NoSuchObjectException
- This method is used to deregister a currently exported server object from the ORB
runtimes, allowing the object to become available for garbage collection.
narrow
public static java.lang.Object narrow(java.lang.Object obj,
java.lang.Class newClass)
throws java.lang.ClassCastException
- This method takes an object reference or an object of an RMI/IDL abstract interface type
and attemps to narrow it to conform to the given newClass RMI/IDL type.
connect
public static void connect(java.rmi.Remote target,
java.rmi.Remote source)
throws java.rmi.RemoteException
- This method makes the remote object target ready for remote communication using the
same communications runtime as source.