org.objectweb.carol.rmi.multi
Class JacORBPRODelegate
java.lang.Object
org.objectweb.carol.rmi.multi.JacORBPRODelegate
- PortableRemoteObjectDelegate
public class JacORBPRODelegate
extends java.lang.Object
implements PortableRemoteObjectDelegate
TODO : Use the same class for all JVM (maybe Classpath implementation ?)
- Florent Benoit
void | connect(Remote target, Remote source) - Makes a Remote object ready for remote communication.
|
void | exportObject(Remote obj) - Makes a server object ready to receive remote calls.
|
Object | narrow(Object narrowFrom, Class narrowTo) - Checks to ensure that an object of a remote or abstract interface type
can be cast to a desired type.
|
Remote | toStub(Remote obj) - Returns a stub for the given server object.
|
void | unexportObject(Remote obj) - Deregisters a server object from the runtime, allowing the object to become
available for garbage collection.
|
connect
public void connect(Remote target,
Remote source)
throws RemoteException
Makes a Remote object ready for remote communication. This normally
happens implicitly when the object is sent or received as an argument
on a remote method call, but in some circumstances it is useful to
perform this action by making an explicit call. See the
Stub.connect
method for more information.
target
- the object to connect.source
- a previously connected object.
exportObject
public void exportObject(Remote obj)
throws RemoteException
Makes a server object ready to receive remote calls. Note
that subclasses of PortableRemoteObject do not need to call this
method, as it is called by the constructor.
obj
- the server object to export.
narrow
public Object narrow(Object narrowFrom,
Class narrowTo)
throws ClassCastException
Checks to ensure that an object of a remote or abstract interface type
can be cast to a desired type.
narrowFrom
- the object to check.narrowTo
- the desired type.
- an object which can be cast to the desired type.
toStub
public Remote toStub(Remote obj)
throws NoSuchObjectException
obj
- the server object for which a stub is required. Must either be a subclass
of PortableRemoteObject or have been previously the target of a call to
- the most derived stub for the object.
unexportObject
public void unexportObject(Remote obj)
throws NoSuchObjectException
Deregisters a server object from the runtime, allowing the object to become
available for garbage collection.
obj
- the object to unexport.