Class java.rmi.server.UnicastRemoteObject
java.lang.Object
|
+----java.rmi.server.RemoteObject
|
+----java.rmi.server.RemoteServer
|
+----java.rmi.server.UnicastRemoteObject
- Subclasses:
- ActivationGroup
- 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.
Constructor Summary
|
UnicastRemoteObject()
Create and export a new UnicastRemoteObject object using an
anonymous port.
|
UnicastRemoteObject(int port)
Create and export a new UnicastRemoteObject object using the
particular supplied port.
|
UnicastRemoteObject(int port,
SocketType socketType)
Create and export a new UnicastRemoteObject object using the
particular supplied port and socket type.
|
Method Summary
|
Object
|
clone()
Returns a clone of the remote object that is distinct from
the original.
|
static RemoteStub
|
exportObject(Remote obj)
Export the remote object to make it available to receive incoming calls,
using an anonymous port.
|
static Remote
|
exportObject(Remote obj,
int port)
Export the remote object to make it available to receive incoming calls,
using the particular supplied port.
|
static Remote
|
exportObject(Remote obj,
int port,
SocketType socketType)
Export the remote object to make it available to receive incoming calls,
using a transport specified by the given socket type.
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 Remote 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 Remote 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
Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.