org.objectweb.carol.rmi.multi

Class JacORBPRODelegate

Implemented Interfaces:
PortableRemoteObjectDelegate

public class JacORBPRODelegate
extends java.lang.Object
implements PortableRemoteObjectDelegate

TODO : Use the same class for all JVM (maybe Classpath implementation ?)

Author:
Florent Benoit

Method Summary

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.

Method Details

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.

Parameters:
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.

Parameters:
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.

Parameters:
narrowFrom - the object to check.
narrowTo - the desired type.

Returns:
an object which can be cast to the desired type.


toStub

public Remote toStub(Remote obj)
            throws NoSuchObjectException

Parameters:
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

Returns:
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.

Parameters:
obj - the object to unexport.