public class RegistryLocator extends Object
Although the Registry implementation uses rmi underneath, the rmi registry is fully encapsulated inside the Registry and RegistryLocator to avoid any confusion in the agent programs and other programs accessing the registry.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT
The default registry port for Faban - 9998.
|
Constructor and Description |
---|
RegistryLocator() |
Modifier and Type | Method and Description |
---|---|
static Registry |
getRegistry()
Obtains a reference to the registry on the local system using the
system property faban.registry.port as the port.
|
static Registry |
getRegistry(int port)
Obtains a reference to the registry on the local system using the
port specified.
|
static Registry |
getRegistry(String master)
Obtains a reference to the registry on the remote master system using the
system property faban.registry.port as the port.
|
static Registry |
getRegistry(String master,
int port)
Obtains a reference to the registry on the remote master system using the
port specified.
|
public static final int DEFAULT_PORT
public static Registry getRegistry() throws RemoteException, NotBoundException
RemoteException
- Cannot access the registry.NotBoundException
- The registry itself is not bound.public static Registry getRegistry(String master) throws RemoteException, NotBoundException
master
- The master host nameRemoteException
- Cannot access the registryNotBoundException
- The registry itself is not boundpublic static Registry getRegistry(int port) throws RemoteException, NotBoundException
port
- The port to connect to the registryRemoteException
- Cannot access the registry.NotBoundException
- The registry itself is not bound.public static Registry getRegistry(String master, int port) throws RemoteException, NotBoundException
master
- The master host nameport
- The port to connect to the registryRemoteException
- Cannot access the registryNotBoundException
- The registry itself is not bound