public final class RegistryImpl
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REG_PREFIX
Registry prefix
|
Modifier and Type | Method and Description |
---|---|
void |
bindCluster(java.lang.String n,
byte[] obj)
Bind a cluster entry
|
void |
bindSingle(java.lang.String n,
java.rmi.Remote obj)
Bind a single entry
|
java.lang.String[] |
list()
Get the entries list
|
java.lang.Object |
lookup(java.lang.String n)
Retrieve an object by a name
|
static void |
main(java.lang.String[] args)
Test purposes
|
void |
rebindCluster(java.lang.String n,
byte[] obj)
Rebind a cluster entry
|
void |
rebindSingle(java.lang.String n,
java.rmi.Remote obj)
Rebind a single entry
|
static RegistryKiller |
start(int port)
Start the registry
|
void |
test()
Test method
|
void |
unbind(java.lang.String n)
Unbind an entry
|
public static final java.lang.String REG_PREFIX
public static RegistryKiller start(int port) throws java.rmi.RemoteException
port
- port numberjava.rmi.RemoteException
- if an exception is encounteredpublic java.lang.Object lookup(java.lang.String n) throws java.rmi.NotBoundException, java.rmi.RemoteException
n
- name to searchjava.rmi.NotBoundException
- if entry is not foundjava.rmi.RemoteException
- if an exception is encounteredpublic void bindSingle(java.lang.String n, java.rmi.Remote obj) throws java.rmi.AlreadyBoundException, java.rmi.RemoteException
n
- nameobj
- objectjava.rmi.AlreadyBoundException
- if the entry is already boundjava.rmi.RemoteException
- if an exception is encounteredpublic void rebindSingle(java.lang.String n, java.rmi.Remote obj) throws java.rmi.RemoteException
n
- nameobj
- objectjava.rmi.RemoteException
- if an exception is encounteredpublic void bindCluster(java.lang.String n, byte[] obj) throws java.rmi.AlreadyBoundException, java.rmi.RemoteException
n
- cluster nameobj
- array of objectsjava.rmi.AlreadyBoundException
- if the entry is already boundjava.rmi.RemoteException
- if an exception is encounteredpublic void unbind(java.lang.String n) throws java.rmi.NotBoundException, java.rmi.RemoteException
n
- entry to unregisterjava.rmi.NotBoundException
- if entry is not foundjava.rmi.RemoteException
- if an exception is encounteredpublic void rebindCluster(java.lang.String n, byte[] obj) throws java.rmi.RemoteException
n
- cluster nameobj
- array of objectsjava.rmi.RemoteException
- if an exception is encounteredpublic java.lang.String[] list() throws java.rmi.RemoteException
java.rmi.RemoteException
- if Exception is encounteredpublic void test() throws java.rmi.RemoteException
java.rmi.RemoteException
- if exception is encounteredpublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- program argsjava.lang.Exception
- if error