org.objectweb.carol.cmi
Class LowerOrb

java.lang.Object
  extended by org.objectweb.carol.cmi.LowerOrb

public class LowerOrb
extends java.lang.Object

Exports the internal methods of the underlying ORB.

Author:
Simon Nieuviarts

Field Summary
static int DEFAULT_CREG_PORT
          Default port number
static int REG_ID
          Reg ID
 
Constructor Summary
LowerOrb()
           
 
Method Summary
static void exportObject(java.rmi.Remote obj)
           
static java.rmi.Remote exportRegistry(java.rmi.Remote obj, int port)
          Export an object thru lower Orb
static javax.rmi.CORBA.PortableRemoteObjectDelegate getPRODelegate()
          Get the PortableRemoteObjectDelegate
static java.rmi.Remote getRegistryStub(java.lang.String className, java.lang.String host, int port)
          Get a remote ref thru lower Orb
static void setPRODelegate(javax.rmi.CORBA.PortableRemoteObjectDelegate rmiDelegate)
          Set the PortableRemoteObjectDelegate
static java.rmi.Remote toStub(java.rmi.Remote obj)
           
static void unexportObject(java.rmi.Remote obj)
           
static void unexportRegistry(java.rmi.Remote obj)
          Unexport the registry thru the lower Orb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CREG_PORT

public static final int DEFAULT_CREG_PORT
Default port number

See Also:
Constant Field Values

REG_ID

public static final int REG_ID
Reg ID

See Also:
Constant Field Values
Constructor Detail

LowerOrb

public LowerOrb()
Method Detail

toStub

public static java.rmi.Remote toStub(java.rmi.Remote obj)
                              throws java.rmi.NoSuchObjectException
Throws:
java.rmi.NoSuchObjectException
See Also:
Remote

exportObject

public static void exportObject(java.rmi.Remote obj)
                         throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
See Also:
Remote

unexportObject

public static void unexportObject(java.rmi.Remote obj)
                           throws java.rmi.NoSuchObjectException
Throws:
java.rmi.NoSuchObjectException
See Also:
Remote

getPRODelegate

public static javax.rmi.CORBA.PortableRemoteObjectDelegate getPRODelegate()
Get the PortableRemoteObjectDelegate

See Also:
Remote

setPRODelegate

public static void setPRODelegate(javax.rmi.CORBA.PortableRemoteObjectDelegate rmiDelegate)
Set the PortableRemoteObjectDelegate

See Also:
Remote

exportRegistry

public static java.rmi.Remote exportRegistry(java.rmi.Remote obj,
                                             int port)
                                      throws java.rmi.RemoteException
Export an object thru lower Orb

Parameters:
obj - object to export
port - port
Returns:
Remote object
Throws:
java.rmi.RemoteException - if an error is encountered

unexportRegistry

public static void unexportRegistry(java.rmi.Remote obj)
                             throws java.rmi.NoSuchObjectException,
                                    java.rmi.RemoteException
Unexport the registry thru the lower Orb

Parameters:
obj - object to export
Throws:
java.rmi.NoSuchObjectException - if the object is not found
java.rmi.RemoteException

getRegistryStub

public static java.rmi.Remote getRegistryStub(java.lang.String className,
                                              java.lang.String host,
                                              int port)
                                       throws java.rmi.RemoteException
Get a remote ref thru lower Orb

Parameters:
className - class name
host - host
port - port
Returns:
Remote ref
Throws:
java.rmi.RemoteException - in an error occurs