public class SimpleObjectRegistry
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_HIGH_PORT |
The default values for LOWPORT and HIGHPORT arguments.
|
static int |
DEFAULT_LOW_PORT |
The default values for LOWPORT and HIGHPORT arguments.
|
static int |
DEFAULT_PORTS |
The default values for LOWPORT and HIGHPORT arguments.
|
Constructor | Description |
---|---|
SimpleObjectRegistry() |
Same as SimpleObjectRegistry(DEFAULT_LOW_PORT, DEFAULT_HIGH_PORT).
|
SimpleObjectRegistry(int port) |
Return SimpleObjectRegistry(PORT, PORT).
|
SimpleObjectRegistry(int lowPort,
int highPort) |
Create a new SimpleObjectRegistry on one of the ports LOWPORT to
HIGHPORT, if possible.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Remove all bindings from this registry, and disable it from further
use.
|
static java.rmi.Remote |
findObject(java.lang.String name,
java.lang.String host) |
Return findObject(NAME, HOST, DEFAULT_LOW_PORT, DEFAULT_HIGH_PORT).
|
static java.rmi.Remote |
findObject(java.lang.String name,
java.lang.String[] hosts) |
Return findObject(NAME, HOSTS, DEFAULT_LOW_PORT, DEFAULT_HIGH_PORT).
|
static java.rmi.Remote |
findObject(java.lang.String name,
java.lang.String[] hosts,
int lowPort,
int highPort) |
Return a remote object named NAME in some registry on one of the
hosts in HOSTS on some port number between LOWPORT and HIGHPORT.
|
static java.rmi.Remote |
findObject(java.lang.String name,
java.lang.String host,
int lowPort,
int highPort) |
Return a remote object named NAME in some registry on HOST on
some port number between LOWPORT and HIGHPORT.
|
int |
port() |
Return the port number on which this registry is exported.
|
void |
rebind(java.lang.String name,
java.rmi.Remote value) |
Bind NAME to VALUE in this registry, replacing any existing binding.
|
void |
unbind() |
Remove all bindings in this registry.
|
void |
unbind(java.lang.String name) |
Remove any binding of NAME in this registry.
|
public static final int DEFAULT_PORTS
public static final int DEFAULT_LOW_PORT
public static final int DEFAULT_HIGH_PORT
public SimpleObjectRegistry(int lowPort, int highPort) throws java.rmi.RemoteException
java.rmi.RemoteException
public SimpleObjectRegistry(int port) throws java.rmi.RemoteException
java.rmi.RemoteException
public SimpleObjectRegistry() throws java.rmi.RemoteException
java.rmi.RemoteException
public static java.rmi.Remote findObject(java.lang.String name, java.lang.String host, int lowPort, int highPort) throws java.rmi.NotBoundException
java.rmi.NotBoundException
public static java.rmi.Remote findObject(java.lang.String name, java.lang.String host) throws java.rmi.NotBoundException
java.rmi.NotBoundException
public static java.rmi.Remote findObject(java.lang.String name, java.lang.String[] hosts, int lowPort, int highPort) throws java.rmi.NotBoundException
java.rmi.NotBoundException
public static java.rmi.Remote findObject(java.lang.String name, java.lang.String[] hosts) throws java.rmi.NotBoundException
java.rmi.NotBoundException
public int port()
public void rebind(java.lang.String name, java.rmi.Remote value)
public void unbind(java.lang.String name)
public void unbind()
public void close()