java.lang.Object | |||
↳ | java.rmi.server.RemoteObject | ||
↳ | java.rmi.server.RemoteServer | ||
↳ | java.rmi.server.UnicastRemoteObject |
![]() |
![]() |
Used for exporting a remote object with JRMP and obtaining a stub that communicates to the remote object.
For the constructors and static exportObject
methods
below, the stub for a remote object being exported is obtained as
follows:
UnicastRemoteObject.exportObject(Remote)
method,
a stub class (typically pregenerated from the remote object's class
using the rmic
tool) is loaded and an instance of that stub
class is constructed as follows.
Remote
, then
the remote object's class is the root class; otherwise, the root class is
the most derived superclass of the remote object's class that directly
implements an interface that extends Remote
.
"_Stub"
.
RemoteStub
and must have a
public constructor that has one parameter, of type RemoteRef
.
RemoteRef
.
StubNotFoundException
is thrown.
java.rmi.server.ignoreStubClasses
is set to
"true"
(case insensitive), a Proxy
instance is constructed with the following
properties:
RemoteObjectInvocationHandler
instance constructed with a
RemoteRef
.
StubNotFoundException
will be thrown.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates and exports a new UnicastRemoteObject object using an
anonymous port.
| |||||||||||
Creates and exports a new UnicastRemoteObject object using the
particular supplied port.
| |||||||||||
Creates and exports a new UnicastRemoteObject object using the
particular supplied port and socket factories.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a clone of the remote object that is distinct from
the original.
| |||||||||||
Exports the remote object to make it available to receive incoming
calls using an anonymous port.
| |||||||||||
Exports the remote object to make it available to receive incoming
calls, using a transport specified by the given socket factory.
| |||||||||||
Exports the remote object to make it available to receive incoming
calls, using the particular supplied port.
| |||||||||||
Removes the remote object, obj, from the RMI runtime.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates and exports a new UnicastRemoteObject object using an anonymous port.
RemoteException | if failed to export object |
---|
Creates and exports a new UnicastRemoteObject object using the particular supplied port.
port | the port number on which the remote object receives calls
(if port is zero, an anonymous port is chosen) |
---|
RemoteException | if failed to export object |
---|
Creates and exports a new UnicastRemoteObject object using the particular supplied port and socket factories.
port | the port number on which the remote object receives calls
(if port is zero, an anonymous port is chosen) |
---|---|
csf | the client-side socket factory for making calls to the remote object |
ssf | the server-side socket factory for receiving remote calls |
RemoteException | if failed to export object |
---|
Returns a clone of the remote object that is distinct from the original.
CloneNotSupportedException | if clone failed due to a RemoteException. |
---|
Exports the remote object to make it available to receive incoming calls using an anonymous port.
obj | the remote object to be exported |
---|
RemoteException | if export fails |
---|
Exports the remote object to make it available to receive incoming calls, using a transport specified by the given socket factory.
obj | the remote object to be exported |
---|---|
port | the port to export the object on |
csf | the client-side socket factory for making calls to the remote object |
ssf | the server-side socket factory for receiving remote calls |
RemoteException | if export fails |
---|
Exports the remote object to make it available to receive incoming calls, using the particular supplied port.
obj | the remote object to be exported |
---|---|
port | the port to export the object on |
RemoteException | if export fails |
---|
Removes the remote object, obj, from the RMI runtime. If successful, the object can no longer accept incoming RMI calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object.
obj | the remote object to be unexported |
---|---|
force | if true, unexports the object even if there are pending or in-progress calls; if false, only unexports the object if there are no pending or in-progress calls |
NoSuchObjectException | if the remote object is not currently exported |
---|