All Packages Class Hierarchy This Package Previous Next Index
Class java.rmi.server.UnicastRemoteObject
java.lang.Object
|
+----java.rmi.server.RemoteObject
|
+----java.rmi.server.RemoteServer
|
+----java.rmi.server.UnicastRemoteObject
- public class UnicastRemoteObject
- extends RemoteServer
The UnicastRemoteObject class defines a non-replicated remote
object whose references are valid only while the server process is
alive. The UnicastRemoteObject class provides support for
point-to-point active object references (invocations, parameters,
and results) using TCP streams.
Objects that require remote behavior should extend RemoteObject,
typically via UnicastRemoteObject. If UnicastRemoteObject is not
extended, the implementation class must then assume the
responsibility for the correct semantics of the hashCode, equals,
and toString methods inherited from the Object class, so that they
behave appropriately for remote objects.
UnicastRemoteObject()
- Create and export a new UnicastRemoteObject object using an
anonymous port.
UnicastRemoteObject(int)
- Create and export a new UnicastRemoteObject object using the
particular supplied port.
UnicastRemoteObject(int, SocketType)
- Create and export a new UnicastRemoteObject object using the
particular supplied port and socket type.
clone()
- Returns a clone of the remote object that is distinct from
the original.
exportObject(Remote)
- Export the remote object to make it available to receive incoming calls,
using an anonymous port.
exportObject(Remote, int)
- Export the remote object to make it available to receive incoming calls,
using the particular supplied port.
exportObject(Remote, int, SocketType)
- Export the remote object to make it available to receive incoming calls,
using a transport specified by the given socket type.
exportObject(Remote, String, Class[], Object[])
-
UnicastRemoteObject
protected UnicastRemoteObject() throws RemoteException
- Create and export a new UnicastRemoteObject object using an
anonymous port.
UnicastRemoteObject
protected UnicastRemoteObject(int port) throws RemoteException
- Create and export a new UnicastRemoteObject object using the
particular supplied port.
- Parameters:
- port - the port to export the object on
UnicastRemoteObject
protected UnicastRemoteObject(int port,
SocketType socketType) throws RemoteException
- Create and export a new UnicastRemoteObject object using the
particular supplied port and socket type.
clone
public Object clone() throws CloneNotSupportedException
- Returns a clone of the remote object that is distinct from
the original.
- Returns:
- the new remote object
- Throws:
CloneNotSupportedException
- if clone failed due to
a RemoteException.
- Overrides:
- clone in class Object
exportObject
public static RemoteStub exportObject(Remote obj) throws RemoteException
- Export the remote object to make it available to receive incoming calls,
using an anonymous port.
- Parameters:
- obj - the remote object to be exported
- Throws:
RemoteException
- if export fails
exportObject
public static RemoteStub exportObject(Remote obj,
int port) throws RemoteException
- Export the remote object to make it available to receive incoming calls,
using the particular supplied port.
- Parameters:
- obj - the remote object to be exported
- port - the port to export the object on
- Throws:
RemoteException
- if export fails
exportObject
public static RemoteStub exportObject(Remote obj,
int port,
SocketType socketType) throws RemoteException
- Export the remote object to make it available to receive incoming calls,
using a transport specified by the given socket type.
- Parameters:
- obj - the remote object to be exported
- port - the port to export the object on
- socketType - the socket type to export object with
- Throws:
RemoteException
- if export fails
exportObject
protected static RemoteStub exportObject(Remote obj,
String refType,
Class[] params,
Object[] args) throws RemoteException
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature