org.objectweb.carol.cmi
Class PRODelegate

java.lang.Object
  extended by org.objectweb.carol.cmi.PRODelegate
All Implemented Interfaces:
javax.rmi.CORBA.PortableRemoteObjectDelegate

public class PRODelegate
extends java.lang.Object
implements javax.rmi.CORBA.PortableRemoteObjectDelegate

Class PRODelegate for use by PortableRemoteObject.

Author:
Simon Nieuviarts

Field Summary
static java.lang.String EQUIV_PREFIX
          Equiv prefix
 
Constructor Summary
PRODelegate()
          Get the lower ORB delegate to export objects.
PRODelegate(javax.rmi.CORBA.PortableRemoteObjectDelegate rmi)
          Get the Lower ORB delegate with a link to the underlaying ORB
 
Method Summary
 void connect(java.rmi.Remote target, java.rmi.Remote source)
          Connection method
 void exportObject(java.rmi.Remote obj)
          Export a Remote Object
 java.lang.Object narrow(java.lang.Object obj, java.lang.Class newClass)
          Narrow method
 java.rmi.Remote toStub(java.rmi.Remote obj)
          To stub method
 void unexportObject(java.rmi.Remote obj)
          Method for unexport object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQUIV_PREFIX

public static final java.lang.String EQUIV_PREFIX
Equiv prefix

See Also:
Constant Field Values
Constructor Detail

PRODelegate

public PRODelegate()
Get the lower ORB delegate to export objects.


PRODelegate

public PRODelegate(javax.rmi.CORBA.PortableRemoteObjectDelegate rmi)
Get the Lower ORB delegate with a link to the underlaying ORB

Parameters:
rmi - lower ORB
Method Detail

exportObject

public void exportObject(java.rmi.Remote obj)
                  throws java.rmi.RemoteException
Export a Remote Object

Specified by:
exportObject in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Parameters:
obj - Remote object to export
Throws:
java.rmi.RemoteException - exporting remote object problem

unexportObject

public void unexportObject(java.rmi.Remote obj)
                    throws java.rmi.NoSuchObjectException
Method for unexport object

Specified by:
unexportObject in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Parameters:
obj - Remote obj object to unexport
Throws:
java.rmi.NoSuchObjectException - if the object is not currently exported

connect

public void connect(java.rmi.Remote target,
                    java.rmi.Remote source)
             throws java.rmi.RemoteException
Connection method

Specified by:
connect in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Parameters:
target - a remote object;
source - another remote object;
Throws:
java.rmi.RemoteException - if the connection fail

narrow

public java.lang.Object narrow(java.lang.Object obj,
                               java.lang.Class newClass)
                        throws java.lang.ClassCastException
Narrow method

Specified by:
narrow in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Parameters:
obj - Remote obj the object to narrow
newClass - Class newClass the expected type of the result
Returns:
an object of type newClass
Throws:
java.lang.ClassCastException - if the obj class is not compatible with a newClass cast

toStub

public java.rmi.Remote toStub(java.rmi.Remote obj)
                       throws java.rmi.NoSuchObjectException
To stub method

Specified by:
toStub in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Parameters:
obj - Remote object to unexport
Returns:
the stub object
Throws:
java.rmi.NoSuchObjectException - if the object is not currently exported