|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Offers access to services organized along a hierarchy of dialogs.
A service is defined by an interface extending the tagging interface Service
and implemented by a class that implements the defining interface.
Services are organized in a hierarchy defined by a
HierarchyProvider.
In that hierarchy, services are registered at a node identified by an
ID. Only nodes known in that hierarchy may have services registered to.
There are two methods for requesting a service:
findServiceInHierarchy(ID, Class). This method is useful if
you are looking for a hierarchy dependent service or a service that may
vary within a hierarchy, e.g. a display oriented service within a dialog hierarchy.
getServiceDirect(ID, Class). This method is useful if you want to
initiate a direct communication with one specific node, e.g. one specific sub
dialog.
Please note that the service provider does not use any possible inheritance
in the interfaces used to define service. If you have an service interface
ServiceA and a service interface ServiceB that
extends ServiceA, a request for ServiceA will fail
if only the interface ServiceB is registered.
This interface provides only access to the service hierarchy but does not allow
any modification. Services may be registered using a DialogServiceManager.
Implementations of this interface should be threadsafe.
Note: if we'd use java 1.5, this would be a generic.
| Method Summary | |
void |
collectSystemInfo(ID id,
SystemInfoNode root,
SystemInfoOptions options)
Builds the system information tree upon local information of the implementor about the dialog with the ID given. |
Service |
findServiceInHierarchy(ID id,
java.lang.Class service)
Returns the first implementation of a desired service in the hierarchy starting from the node with the given id to the root node. |
Service |
findServiceInHierarchy(ID id,
ID rootID,
java.lang.Class service)
Returns the first implementation of a desired service in the hierarchy starting from the node with the given id to the specified root node. |
Service |
getServiceDirect(ID id,
java.lang.Class service)
Returns the implementation of a desired service registered at the node with the given id. |
boolean |
hasServiceDirect(ID id,
java.lang.Class service)
Tests whether a specific node offers a service. |
boolean |
hasServiceInHierarchy(ID id,
java.lang.Class service)
Tests whether the service is offered in the hierarchy starting from the node with the given id. |
boolean |
hasServiceInHierarchy(ID id,
ID rootID,
java.lang.Class service)
Tests whether the service is offered in the hierarchy starting from the node with the given id to the specified root node. |
| Method Detail |
public boolean hasServiceInHierarchy(ID id,
java.lang.Class service)
id - the id of the node at which the search starts towards the root nodeservice - the class of the service interface that is searched for
java.lang.IllegalArgumentException - if the id is unknown or if the
service class is not an interface that extends Service.
public boolean hasServiceInHierarchy(ID id,
ID rootID,
java.lang.Class service)
id - the id of the node at which the search starts towards the root noderootID - the root id where to stop looking for a parent provider (may
be null or not contained in id's hierarchy tree, which will be
threated at the root of the current hierarchy tree)service - the class of the service interface that is searched for
java.lang.IllegalArgumentException - if the id is unknown or if the
service class is not an interface that extends Service.
public Service findServiceInHierarchy(ID id,
java.lang.Class service)
id - the id of the node at which the search starts towards the root nodeservice - the class of the service interface that is searched for
java.lang.IllegalArgumentException - if the id is unknown, if the
service class is not an interface that extends Service, or if
the service is not available.
public Service findServiceInHierarchy(ID id,
ID rootID,
java.lang.Class service)
id - the id of the node at which the search starts towards the root noderootID - the root id where to stop looking for a parent provider (may
be null or not contained in id's hierarchy tree, which will be
threated at the root of the current hierarchy tree)service - the class of the service interface that is searched for
java.lang.IllegalArgumentException - if the id is unknown, if the
service class is not an interface that extends Service, or if
the service is not available.
public boolean hasServiceDirect(ID id,
java.lang.Class service)
id - the id of the nodeservice - the class of the service interface that is searched for
java.lang.IllegalArgumentException - if the id is unknown or if the
service class is not an interface that extends Service.
public Service getServiceDirect(ID id,
java.lang.Class service)
id - the id of the nodeservice - the class of the service interface that is requested
java.lang.IllegalArgumentException - if the id is unknown, if the
service class is not an interface that extends Service, or if
the service is not available at the given node
public void collectSystemInfo(ID id,
SystemInfoNode root,
SystemInfoOptions options)
ID given.
id - the ID to append system information to the node givenroot - the SystemInfoNode to add information to (guaranteed to be not null)options - contains additional options, that might influence the amount of
information added to the tree (guaranteed to be not null)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||