|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ucb.util.SimpleObjectRegistry
public class SimpleObjectRegistry
A kind of registry that provides a very simple means of exchanging remote objects by name. One can create a registry, allowing the constructor to select an available port. One can find a bound object by name over a sequence of port numbers and hosts.
Constructor Summary | |
---|---|
SimpleObjectRegistry()
Same as SimpleObjectRegistry (DEFAULT_LOW_PORT, DEFAULT_HIGH_PORT). |
|
SimpleObjectRegistry(int port)
Same as SimpleObjectRegistry (PORT, PORT). |
|
SimpleObjectRegistry(int lowPort,
int highPort)
Create a new SimpleObjectRegistry on one of the ports LOWPORT to HIGHPORT, if possible. |
Method Summary | |
---|---|
void |
close()
Remove all bindings from this registry, and disable it from further use. |
static Remote |
findObject(String name,
String host)
Same as findObject (NAME, HOST, DEFAULT_LOW_PORT, DEFAULT_HIGH_PORT). |
static Remote |
findObject(String name,
String[] hosts)
Same as findObject (NAME, HOSTS, DEFAULT_LOW_PORT, DEFAULT_HIGH_PORT). |
static Remote |
findObject(String name,
String[] hosts,
int lowPort,
int highPort)
|
static Remote |
findObject(String name,
String host,
int lowPort,
int highPort)
Find an remote object named NAME in some registry on HOST on some port number between LOWPORT and HIGHPORT. |
int |
port()
The port number on which this registry is exported. |
void |
rebind(String name,
Remote value)
Bind NAME to VALUE in this registry, replacing any existing binding. |
void |
unbind()
Remove all bindings in this registry. |
void |
unbind(String name)
Remove any binding of NAME in this registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleObjectRegistry(int lowPort, int highPort) throws RemoteException
RemoteException
public SimpleObjectRegistry(int port) throws RemoteException
RemoteException
public SimpleObjectRegistry() throws RemoteException
RemoteException
Method Detail |
---|
public static Remote findObject(String name, String host, int lowPort, int highPort) throws NotBoundException
NotBoundException
public static Remote findObject(String name, String host) throws NotBoundException
NotBoundException
public static Remote findObject(String name, String[] hosts, int lowPort, int highPort) throws NotBoundException
NotBoundException
public static Remote findObject(String name, String[] hosts) throws NotBoundException
NotBoundException
public int port()
public void rebind(String name, Remote value)
public void unbind(String name)
public void unbind()
public void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |