|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.ServiceManagerImpl
public class ServiceManagerImpl
The ServiceManagerImpl class is the actual
implementation of JADE platform Service Manager and
Service Finder components. It holds a set of services and
manages them.
| Field Summary |
|---|
| Fields inherited from interface jade.core.ServiceFinder |
|---|
MAIN_SLICE, THIS_SLICE |
| Method Summary | |
|---|---|
void |
activateService(ServiceDescriptor desc)
Activates a new service on the local agent container. |
void |
addAddress(java.lang.String addr)
Adds an address to the address list of this Service Manager. |
void |
addNode(NodeDescriptor desc,
ServiceDescriptor[] services)
Adds a new node to the distributed platform. |
void |
deactivateService(java.lang.String name)
Deactivates a service on the local container. |
Service.Slice[] |
findAllSlices(java.lang.String serviceKey)
Retrieves all the slices of a service currently active on this platform. |
Service |
findService(java.lang.String key)
Looks up a platform service by name. |
Service.Slice |
findSlice(java.lang.String serviceKey,
java.lang.String sliceKey)
Looks up a specific service slice by name. |
java.lang.String |
getLocalAddress()
Access the address exported by this copy of the Service Manager. |
java.util.Vector |
getLocalServices()
Retrieve the list of locally installed services as a Vector of ServiceDescriptor objects |
java.lang.String |
getPlatformName()
Retrieves the platform name from the platform Service Manager. |
void |
removeAddress(java.lang.String addr)
Removes an address to the address list of this Service Manager. |
void |
removeNode(NodeDescriptor desc)
Removes a node from the distributed platform. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String getPlatformName()
throws IMTPException
ServiceManager
getPlatformName in interface ServiceManagerIMTPException - If an underlying network error forbids to
fetch the name from the remote end.
public void addAddress(java.lang.String addr)
throws IMTPException
ServiceManager
addAddress in interface ServiceManageraddr - The address to add, as a stringified URL.
IMTPException - If an underlying network error occurs.
public void removeAddress(java.lang.String addr)
throws IMTPException
ServiceManager
removeAddress in interface ServiceManageraddr - The address to remove, as a stringified URL.
IMTPException - If an underlying network error occurs.
public java.lang.String getLocalAddress()
throws IMTPException
ServiceManager
getLocalAddress in interface ServiceManagerIMTPException - If an underlying network error occurs.
public void addNode(NodeDescriptor desc,
ServiceDescriptor[] services)
throws IMTPException,
ServiceException,
jade.security.JADESecurityException
ServiceManager
addNode in interface ServiceManagerdesc - The description of the new node to add, containing
the node identifier and other node properties.services - An array of ServiceDescriptor
objects, describing the various kernel-level services that are
to be activated on the newly created node.
IMTPException - If an underlying network error forbids to
tell whether the requested operation was possible. In that
case, the operation is not executed.
ServiceException - If the requested operation couldn't be
executed (or an execution attempt failed) due to some condition
on the remote end.
jade.security.JADESecurityException
public void removeNode(NodeDescriptor desc)
throws IMTPException,
ServiceException
ServiceManager
removeNode in interface ServiceManagerdesc - The description of the node to remove. At the very
least, the description must contain a node identifier used as a
key in node findng operations.
IMTPException - If an underlying network error forbids to
tell whether the requested operation was possible. In that
case, the operation is not executed.
ServiceException - If the requested operation couldn't be
executed (or an execution attempt failed) due to some condition
on the remote end.
public void activateService(ServiceDescriptor desc)
throws IMTPException,
ServiceException
ServiceManager
activateService in interface ServiceManagerdesc - The ServiceDescriptor object
specifying the Service object implementing the
service, along with the name and properties of the service.
IMTPException - If an underlying network error forbids to
tell whether the requested operation was possible. In that
case, the operation is not executed.
ServiceException - If the requested operation couldn't be
executed (or an execution attempt failed) due to some condition
on the remote end.ServiceFinder
public void deactivateService(java.lang.String name)
throws IMTPException,
ServiceException
ServiceManager
deactivateService in interface ServiceManagername - The name of the service to be deactivated.
IMTPException - If an underlying network error forbids to
tell whether the requested operation was possible. In that
case, the operation is not executed.
ServiceException - If the requested operation couldn't be
executed (or an execution attempt failed) due to some condition
on the remote end.ServiceFinder
public Service findService(java.lang.String key)
throws IMTPException,
ServiceException
ServiceFinder
findService in interface ServiceFinderkey - The name of the service. Concrete syntax for service
names is left up to concrete services.
IMTPException
ServiceException
public Service.Slice findSlice(java.lang.String serviceKey,
java.lang.String sliceKey)
throws IMTPException,
ServiceException
ServiceFinder
findSlice in interface ServiceFinderIMTPException
ServiceException
public Service.Slice[] findAllSlices(java.lang.String serviceKey)
throws IMTPException,
ServiceException
ServiceFinder
findAllSlices in interface ServiceFinderserviceKey - The name of the service. Concrete syntax for
service names is left up to concrete services.
Service.Slice objects,
containing all the slices of the requested service.
IMTPException
ServiceExceptionpublic java.util.Vector getLocalServices()
ServiceManager
getLocalServices in interface ServiceManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||