|
|||||||||
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 java.rmi.server.UnicastRemoteObject com.sun.faban.common.RegistryImpl
public class RegistryImpl
This class implements the Registry interface The Registry is the single remote object that runs on the master machine and with which all other instances of remote servers reregister. A remote reference to any remote service is obtained by the GUI as well as the Engine through the registry. There is only one remote server object (the Registry) that is known by rmiregistry running on the master machine. Once a reference to the Registry is obtained by the client, it should use the 'getReference' method to obtain a reference to any type of remote server.
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.
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Method Summary | |
---|---|
int |
getNumServices(String type)
Get the number of registered Services of a type. |
Remote |
getService(String name)
get reference to service from Registry The registry searches in its list of registered services and returns a remote reference to the requested one. |
Remote |
getService(String type,
String name)
get reference to service from Registry The registry searches in its list of registered services and returns a remote reference to the requested one. |
Remote[] |
getServices(String type)
get all references to a type of services from Registry The registry searches in its list of registered services and returns all remote references to the requested type. |
void |
kill()
Kill is called to exit the RMI registry and Registry. |
static void |
main(String[] args)
Registration for RMI serving. |
boolean |
register(String name,
Remote service)
Registers service with Registry. |
boolean |
register(String type,
String name,
Remote service)
Registers service with Registry. |
void |
reregister(String name,
Remote service)
Re-registers service with Registry, replacing old entry if exists. |
void |
reregister(String type,
String name,
Remote service)
Re-registers service with Registry, replacing old entry if exists. |
void |
unregister(String name)
unregister service from Registry The registry removes this service from its list and clients can no longer access it. |
void |
unregister(String type,
String name)
unregister service from Registry The registry removes this service from its list and clients can no longer access it. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
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 |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean register(String name, Remote service)
register
in interface Registry
name
- public driverName of serviceservice
- Remote reference to service
public boolean register(String type, String name, Remote service)
register
in interface Registry
type
- of servicename
- of serviceservice
- Remote reference to service
public void reregister(String name, Remote service)
reregister
in interface Registry
name
- public driverName of serviceservice
- Remote reference to servicepublic void reregister(String type, String name, Remote service)
reregister
in interface Registry
type
- of servicename
- of serviceservice
- Remote reference to servicepublic void unregister(String name)
unregister
in interface Registry
name
- public driverName of servicepublic void unregister(String type, String name)
unregister
in interface Registry
type
- of servicename
- public driverName of servicepublic Remote getService(String name)
getService
in interface Registry
name
- public driverName of service
public Remote getService(String type, String name)
getService
in interface Registry
type
- of servicename
- public driverName of service
public Remote[] getServices(String type)
getServices
in interface Registry
type
- of service
public int getNumServices(String type)
getNumServices
in interface Registry
type
- of service
public void kill()
kill
in interface Registry
public static void main(String[] args)
args
- Command line arguments, not used
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |