org.objectweb.fractal.rmi.registry
Class Registry

java.lang.Object
  extended byorg.objectweb.fractal.rmi.registry.Registry

public class Registry
extends 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 void createRegistry(int port)
          Creates NamingService component 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(String host)
          Returns a reference to the NamingService on the given host, for the default port.
static NamingService getRegistry(String host, int port)
          Returns a reference to the NamingService on the given host and port.
static NamingService getRegistry(String host, int port, NamingContext binder)
          Returns a reference to the NamingService on the given host and port.
static NamingService getRegistry(String host, NamingContext binder)
          Returns a reference to the NamingService on the given host, for the default port.
static void main(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(String[] args)
                 throws 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:
Exception - if something goes wrong.

createRegistry

public static void createRegistry(int port)
                           throws Exception
Creates NamingService component and exports its server interface.

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

getRegistry

public static NamingService getRegistry()
                                 throws 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:
Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry(String host)
                                 throws 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:
Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry(String host,
                                        int port)
                                 throws 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:
Exception - if something goes wrong.

getRegistry

public static NamingService getRegistry(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(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.