|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--sun.rmi.registry.RegistryImpl | +--psl.worklets.WVM_Registry
The Worklets implemented RMI Registry
We subclass the Sun implementation of the registry to add
registration features to the bind, rebind, and unbind methods, and
so that we can restrict who can rebind the names.
Field Summary | |
private java.util.Map |
_names
Collection of name/WVM_URL values |
private java.util.Map |
_regKeys
Collection of WVM_URL/registrationKey values |
Fields inherited from class sun.rmi.registry.RegistryImpl |
|
Fields inherited from class java.rmi.server.RemoteServer |
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Fields inherited from interface java.rmi.registry.Registry |
REGISTRY_PORT |
Constructor Summary | |
(package private) |
WVM_Registry(int port)
Creates a WVM_Registry on the given port |
Method Summary | |
private void |
_registerHost(java.lang.String name,
java.rmi.Remote obj)
Register an object with the RMI bound name |
private void |
_removeHost(java.lang.String name)
Remove the RMI bound name from the registration. |
void |
bind(java.lang.String name,
java.rmi.Remote obj)
Binds the Remote object to the given name |
(package private) java.util.Map |
getRegistrationKeys()
Gets the available registration keys |
static void |
main(java.lang.String[] args)
Creates an external registry from a command line |
void |
rebind(java.lang.String name,
java.rmi.Remote obj)
Rebinds the Remote object to the given name if the binding object is
a WVM_RMI_Transporter |
void |
unbind(java.lang.String name)
Unbinds the name from the registry. |
Methods inherited from class sun.rmi.registry.RegistryImpl |
checkAccess, getID, list, lookup |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.util.Map _regKeys
private java.util.Map _names
Constructor Detail |
WVM_Registry(int port) throws java.rmi.RemoteException
java.rmi.RemoteException
- if the WVM_Registry could not be createdMethod Detail |
java.util.Map getRegistrationKeys()
private void _registerHost(java.lang.String name, java.rmi.Remote obj) throws java.rmi.RemoteException
java.rmi.RemoteException
- if the name/obj cannot be boundprivate void _removeHost(java.lang.String name)
public void bind(java.lang.String name, java.rmi.Remote obj) throws java.rmi.AlreadyBoundException, java.rmi.RemoteException
Remote
object to the given name
bind
in interface java.rmi.registry.Registry
bind
in class sun.rmi.registry.RegistryImpl
java.rmi.AlreadyBoundException
- if the name is already used
java.rmi.RemoteException
- if the object cannot be boundpublic void rebind(java.lang.String name, java.rmi.Remote obj) throws java.rmi.RemoteException, java.rmi.AccessException
Remote
object to the given name if the binding object is
a WVM_RMI_Transporter
rebind
in interface java.rmi.registry.Registry
rebind
in class sun.rmi.registry.RegistryImpl
java.rmi.RemoteException
- if the object cannot be bound
java.rmi.AccessException
- if the object does not have permission to rebind with the namepublic void unbind(java.lang.String name) throws java.rmi.RemoteException, java.rmi.NotBoundException
unbind
in interface java.rmi.registry.Registry
unbind
in class sun.rmi.registry.RegistryImpl
java.rmi.RemoteException
- if the name could not be unbound
java.rmi.NotBoundException
- if the name is not bound in the registrypublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |