org.objectweb.jeremie.binding.moa
Class UnicastRemoteObject
RemoteStub
org.objectweb.jeremie.binding.moa.UnicastRemoteObject
public class UnicastRemoteObject
extends RemoteStub
Provides an implementation of UnicastRemoteObject, multiple instances of
which are managed together by an object adapter
.
static RemoteStub | export(Remote impl, Context hints, JRMIBFactory binder) - Exports the given remote object to the object adapter, and then
recursively to the given binding factory.
|
static RemoteStub | exportObject(Remote impl) - Exports the given remote object.
|
static RemoteStub | exportObject(Remote impl, int port) - Exports the given remote object with a given port.
|
int | hashCode()
|
static Remote | toStub(Remote impl) - Returns the Jeremie stub for the given remote object.
|
static boolean | unexportObject(Remote impl, boolean force) - Unexports the specified remote object.
|
static void | unexportObject(Remote impl, JRMIBFactory binder) - Unexports the given remote object from the object adapter and the given
binding factory.
|
protected Object | writeReplace() - Returns the stub object corresponding to this UnicastRemoteObject.
|
UnicastRemoteObject
protected UnicastRemoteObject()
throws RemoteException
Creates a UnicastRemoteObject and exports it.
UnicastRemoteObject
protected UnicastRemoteObject(int port)
throws RemoteException
Creates a UnicastRemoteObject and exports it with the given port.
port
- the port number on which to export this UnicastRemoteObject.
export
public static RemoteStub export(Remote impl,
Context hints,
JRMIBFactory binder)
throws RemoteException
Exports the given remote object to the object adapter, and then
recursively to the given binding factory.
impl
- the remote object to be exported;hints
- other data that may be useful for the export;binder
- a binding factory.
- a stub corresponding to the remote object.
exportObject
public static RemoteStub exportObject(Remote impl)
throws RemoteException
Exports the given remote object.
impl
- the remote object to export.
- a stub corresponding to the remote object.
exportObject
public static RemoteStub exportObject(Remote impl,
int port)
throws RemoteException
Exports the given remote object with a given port.
impl
- the remote object to export;port
- the port number with which to export the remote object.
- a stub corresponding to the remote object.
hashCode
public int hashCode()
toStub
public static Remote toStub(Remote impl)
throws NoSuchObjectException
Returns the Jeremie stub for the given remote object. The remote object
must previously have been exported to Jeremie, otherwise an exception is
raised.
impl
- the remote object whose stub is required
- the Jeremie stub for the remote object
unexportObject
public static boolean unexportObject(Remote impl,
boolean force)
throws NoSuchObjectException
Unexports the specified remote object. If the boolean parameter is true,
the object is unexported even if there are pending calls or calls in
progress. If the boolean parameter is false, the unexported only if there
are no pending calls or calls in progress.
The force mechanism is not implemented yet.
force
- whether the object should be forcibly unexported or not.
- whether the unexport operation succeeded or not.
unexportObject
public static void unexportObject(Remote impl,
JRMIBFactory binder)
throws NoSuchObjectException
Unexports the given remote object from the object adapter and the given
binding factory.
impl
- the remote object to unexport;binder
- a binding factory.
writeReplace
protected Object writeReplace()
throws ObjectStreamException
Returns the stub object corresponding to this UnicastRemoteObject.