org.objectweb.carol.rmi.multi
Class MultiPRODelegate

java.lang.Object
  extended byorg.objectweb.carol.rmi.multi.MultiPRODelegate
All Implemented Interfaces:
javax.rmi.CORBA.PortableRemoteObjectDelegate

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

Class MultiPRODelegate This is a proxy for multi orb portable remote object delegate reference this class with the systeme property : java -Djavax.rmi.CORBA.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.MultiPRODelegate ... for the moment this class is only for one orb This class parse the communication.xml file for initilization

Version:
1.0, 15/07/2002
Author:
Guillaume Riviere (Guillaume.Riviere@inrialpes.fr)

Constructor Summary
MultiPRODelegate()
           
 
Method Summary
 void connect(java.rmi.Remote target, java.rmi.Remote source)
          Connection method all available protocols
 void exportObject(java.rmi.Remote obj)
          Export a Remote Object on all available protocols
 java.lang.Object narrow(java.lang.Object obj, java.lang.Class newClass)
          Narrow method on the default protocol
 java.rmi.Remote toStub(java.rmi.Remote obj)
          To stub method on the iiop protocol
 void unexportObject(java.rmi.Remote obj)
          Method for unexport object on all available protocols
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiPRODelegate

public MultiPRODelegate()
                 throws java.rmi.RemoteException
Method Detail

exportObject

public void exportObject(java.rmi.Remote obj)
                  throws java.rmi.RemoteException
Export a Remote Object on all available protocols

Specified by:
exportObject in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
Throws:
java.rmi.RemoteException - exporting remote object problem

unexportObject

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

Specified by:
unexportObject in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
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 all available protocols

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 on the default protocol

Specified by:
narrow in interface javax.rmi.CORBA.PortableRemoteObjectDelegate
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 on the iiop protocol

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