|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Registry
The methods in this interface are the public face of Registry 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 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.
Method Summary | |
---|---|
int |
getNumServices(String type)
Get the number of registered services of a given type. |
Remote |
getService(String name)
Get reference to the service from the registry. |
Remote |
getService(String type,
String name)
Get reference to service from registry. |
Remote[] |
getServices(String type)
Get all references to a type of services from registry. |
void |
kill()
Kill is called to exit the RMI registry and Registry. |
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)
Unregisters service from Registry. |
void |
unregister(String type,
String name)
Unregisters service from Registry. |
Method Detail |
---|
boolean register(String name, Remote service) throws RemoteException
name
- public driverName of serviceservice
- Remote reference to service
RemoteException
- A network error occurredboolean register(String type, String name, Remote service) throws RemoteException
type
- of servicename
- of serviceservice
- Remote reference to service
RemoteException
- A network error occurredvoid reregister(String name, Remote service) throws RemoteException
name
- public driverName of serviceservice
- Remote reference to service
RemoteException
- A network error occurredvoid reregister(String type, String name, Remote service) throws RemoteException
type
- of servicename
- of serviceservice
- Remote reference to service
RemoteException
- A network error occurredvoid unregister(String name) throws RemoteException
name
- public driverName of service
RemoteException
- A network error occurredvoid unregister(String type, String name) throws RemoteException
type
- of servicename
- public driverName of service
RemoteException
- A network error occurredRemote getService(String name) throws RemoteException
name
- public driverName of service
RemoteException
- A network error occurredRemote getService(String type, String name) throws RemoteException
type
- of servicename
- public driverName of service
RemoteException
- A network error occurredRemote[] getServices(String type) throws RemoteException
type
- of service
RemoteException
- A network error occurredint getNumServices(String type) throws RemoteException
type
- The type of service
RemoteException
- A network error occurredvoid kill() throws RemoteException
RemoteException
- A network error occurred
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |