public interface Registry extends Remote
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.
Modifier and Type | Method and Description |
---|---|
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.
|
boolean register(String name, Remote service) throws RemoteException
name
- public driverName of serviceservice
- Remote reference to serviceRemoteException
- A network error occurredboolean register(String type, String name, Remote service) throws RemoteException
type
- of servicename
- of serviceservice
- Remote reference to serviceRemoteException
- A network error occurredvoid reregister(String name, Remote service) throws RemoteException
name
- public driverName of serviceservice
- Remote reference to serviceRemoteException
- A network error occurredvoid reregister(String type, String name, Remote service) throws RemoteException
type
- of servicename
- of serviceservice
- Remote reference to serviceRemoteException
- A network error occurredvoid unregister(String name) throws RemoteException
name
- public driverName of serviceRemoteException
- A network error occurredvoid unregister(String type, String name) throws RemoteException
type
- of servicename
- public driverName of serviceRemoteException
- A network error occurredRemote getService(String name) throws RemoteException
name
- public driverName of serviceRemoteException
- A network error occurredRemote getService(String type, String name) throws RemoteException
type
- of servicename
- public driverName of serviceRemoteException
- A network error occurredRemote[] getServices(String type) throws RemoteException
type
- of serviceRemoteException
- A network error occurredint getNumServices(String type) throws RemoteException
type
- The type of serviceRemoteException
- A network error occurredvoid kill() throws RemoteException
RemoteException
- A network error occurred