org.objectweb.fractal.rmi.registry
Class Registry

java.lang.Object
  extended by org.objectweb.fractal.rmi.registry.Registry

public class Registry
extends java.lang.Object

Provides static methods to launch and get access to a Fractal registry.


Field Summary
static int DEFAULT_PORT
          The default port used to export the naming service interface.
 
Method Summary
static org.objectweb.fractal.api.Component createRegistry(int port)
          Creates NamingService component and exports its server interface.
static org.objectweb.fractal.api.Component createRegistry(int port, java.lang.ClassLoader cl)
          Returns a reference to the NamingService on the given host and port.
static org.objectweb.fractal.api.Component createRegistry(int port, java.util.Map hints)
          Creates NamingService component, using the provided context/hints, and exports its server interface.
static NamingService getRegistry()
          Returns a reference to the NamingService on the local host, for the default port.
static NamingService getRegistry(java.lang.String host)
          Returns a reference to the NamingService on the given host, for the default port.
static NamingService getRegistry(java.lang.String host, int port)
          Returns a reference to the NamingService on the given host and port.
static NamingService getRegistry(java.lang.String host, int port, java.lang.ClassLoader cl)
          Returns a reference to the NamingService on the given host and port.
static NamingService getRegistry(java.lang.String host, int port, java.util.Map hints)
          Returns a reference to the NamingService on the given host and port.
static NamingService getRegistry(java.lang.String host, int port, NamingContext binder)
          Returns a reference to the NamingService on the given host and port.
static NamingService getRegistry(java.lang.String host, NamingContext binder)
          Returns a reference to the NamingService on the given host, for the default port.
static org.objectweb.fractal.api.Component getRegistryComponent(java.lang.String host, int port, java.lang.ClassLoader cl)
           
static org.objectweb.fractal.api.Component getRegistryComponent(java.lang.String host, int port, java.util.Map hints)
           
static void main(java.lang.String[] args)
          Launches a Fractal registry on the local host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
The default port used to export the naming service interface.

See Also:
Constant Field Values
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Launches a Fractal registry on the local host.

Parameters:
args - a single argument setting the port number where to pick the naming service interface.
Throws:
java.lang.Exception - if something goes wrong.

createRegistry

public static org.objectweb.fractal.api.Component createRegistry(int port)
                                                          throws java.lang.Exception
Creates NamingService component and exports its server interface.

Parameters:
port - the port number to be used to export the naming service interface.
Throws:
java.lang.Exception - if something goes wrong.

createRegistry

public static org.objectweb.fractal.api.Component createRegistry(int port,
                                                                 java.util.Map hints)
                                                          throws java.lang.Exception
Creates NamingService component, using the provided context/hints, and exports its server interface.

Parameters:
port - the port number to be used to export the naming service interface.
hints - context/hints used when getting the factory, creating the ORB component and getting the bootstrap component
Throws:
java.lang.Exception - if something goes wrong.
See Also:
FactoryFactory.getFactory(java.lang.String, java.util.Map), Factory.newComponent(java.lang.String, java.util.Map), Fractal.getBootstrapComponent(java.util.Map)

createRegistry

public static org.objectweb.fractal.api.Component createRegistry(int port,
                                                                 java.lang.ClassLoader cl)
                                                          throws java.lang.Exception
Returns a reference to the NamingService on the given host and port.

Parameters:
host - the host where the naming service is located.
port - the port that was used to export the naming service on the given host.
cl - a class loader
Returns:
a reference to the NamingService on the given host and port.
Throws:
java.lang.Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry()
                                 throws java.lang.Exception
Returns a reference to the NamingService on the local host, for the default port.

Returns:
a reference to the NamingService on the local host, for the default port.
Throws:
java.lang.Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry(java.lang.String host)
                                 throws java.lang.Exception
Returns a reference to the NamingService on the given host, for the default port.

Parameters:
host - the host where the naming service is located.
Returns:
a reference to the NamingService on the given host, for the default port.
Throws:
java.lang.Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry(java.lang.String host,
                                        int port)
                                 throws java.lang.Exception
Returns a reference to the NamingService on the given host and port.

Parameters:
host - the host where the naming service is located.
port - the port that was used to export the naming service on the given host.
Returns:
a reference to the NamingService on the given host and port.
Throws:
java.lang.Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry(java.lang.String host,
                                        int port,
                                        java.lang.ClassLoader cl)
                                 throws java.lang.Exception
Returns a reference to the NamingService on the given host and port.

Parameters:
host - the host where the naming service is located.
port - the port that was used to export the naming service on the given host.
class - loader a class loader used by this ORB
Returns:
a reference to the NamingService on the given host and port.
Throws:
java.lang.Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry(java.lang.String host,
                                        int port,
                                        java.util.Map hints)
                                 throws java.lang.Exception
Returns a reference to the NamingService on the given host and port.

Parameters:
host - the host where the naming service is located.
port - the port that was used to export the naming service on the given host.
hints - hints
Returns:
a reference to the NamingService on the given host and port.
Throws:
java.lang.Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry(java.lang.String host,
                                        NamingContext binder)
                                 throws JonathanException
Returns a reference to the NamingService on the given host, for the default port.

Parameters:
host - the host where the naming service is located.
binder - the binder to be used to create the binding to the naming service interface.
Returns:
a reference to the NamingService on the given host, for the default port.
Throws:
JonathanException - if something goes wrong.

getRegistry

public static NamingService getRegistry(java.lang.String host,
                                        int port,
                                        NamingContext binder)
                                 throws JonathanException
Returns a reference to the NamingService on the given host and port.

Parameters:
host - the host where the naming service is located.
port - the port that was used to export the naming service on the given host.
binder - the binder to be used to create the binding to the naming service interface.
Returns:
a reference to the NamingService on the given host and port.
Throws:
JonathanException - if something goes wrong.

getRegistryComponent

public static org.objectweb.fractal.api.Component getRegistryComponent(java.lang.String host,
                                                                       int port,
                                                                       java.lang.ClassLoader cl)
                                                                throws java.lang.Exception
Throws:
java.lang.Exception

getRegistryComponent

public static org.objectweb.fractal.api.Component getRegistryComponent(java.lang.String host,
                                                                       int port,
                                                                       java.util.Map hints)
                                                                throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2008 OW2 Consortium. All Rights Reserved.