|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.dialog.impl.DefaultDialogServiceAccess
Default implementation of DialogServiceAccess
that delegates to a DialogServiceManager.
| Constructor Summary | |
DefaultDialogServiceAccess(DialogInstanceId diid,
ID parentDiid,
DialogServiceManager dialogServiceManager)
Constructor. |
|
| Method Summary | |
Service |
findServiceInHierarchy(java.lang.Class service)
Returns the first implementation of a desired service in the hierarchy of the node. |
Service |
findServiceInParentHierarchy(java.lang.Class service)
Returns the first implementation of a desired service in the hierarchy of the parent 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(java.lang.Class service)
Tests if a service exists in the hierarchy of the node. |
boolean |
hasServiceInParentHierarchy(java.lang.Class service)
Tests if a service exists in the hierarchy of the parent node. |
void |
registerService(java.lang.Class service,
Service implementation)
Registers a service for this node. |
void |
registerServiceForHierarchy(java.lang.Class service,
Service implementation)
Registers a service for this node for hierarchical use only. |
void |
unregisterService(java.lang.Class service,
Service implementation)
Unregisters a service for this node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultDialogServiceAccess(DialogInstanceId diid,
ID parentDiid,
DialogServiceManager dialogServiceManager)
diid - the instance id of the dialogdialogServiceManager - the DialogServiceManager used to satisfy the calls| Method Detail |
public boolean hasServiceDirect(ID id,
java.lang.Class service)
DialogServiceAccess
hasServiceDirect in interface DialogServiceAccessid - the id of the nodeservice - the class of the service interface that is searched for
DialogServiceAccess.hasServiceDirect(com.sdm.quasar.client.core.common.ID, java.lang.Class)
public Service getServiceDirect(ID id,
java.lang.Class service)
DialogServiceAccess
getServiceDirect in interface DialogServiceAccessid - the id of the nodeservice - the class of the service interface that is requested
DialogServiceAccess.getServiceDirect(com.sdm.quasar.client.core.common.ID, java.lang.Class)public boolean hasServiceInHierarchy(java.lang.Class service)
DialogServiceAccess
hasServiceInHierarchy in interface DialogServiceAccessservice - the class of the service interface that is searched for
DialogServiceAccess.hasServiceInHierarchy(java.lang.Class)public boolean hasServiceInParentHierarchy(java.lang.Class service)
DialogServiceAccess
hasServiceInParentHierarchy in interface DialogServiceAccessservice - the class of the service interface that is searched for
DialogServiceAccess.hasServiceInParentHierarchy(java.lang.Class)public Service findServiceInHierarchy(java.lang.Class service)
DialogServiceAccess
findServiceInHierarchy in interface DialogServiceAccessservice - the class of the service interface that is searched for
DialogServiceAccess.findServiceInHierarchy(java.lang.Class)public Service findServiceInParentHierarchy(java.lang.Class service)
DialogServiceAccess
findServiceInParentHierarchy in interface DialogServiceAccessservice - the class of the service interface that is searched for
DialogServiceAccess.findServiceInParentHierarchy(java.lang.Class)
public void registerService(java.lang.Class service,
Service implementation)
DialogServiceAccessService,
and the implementation implement that interface.
If there is already an implementation registered for that service, that implementation is replaced by the passed as a parameter.
Please note that a a registered service should be unregistered when the life cycle of the provider ends.
registerService in interface DialogServiceAccessservice - the interface that defines the serviceimplementation - the implementation of the serviceDialogServiceAccess.registerService(java.lang.Class, com.sdm.quasar.client.core.common.services.Service)
public void registerServiceForHierarchy(java.lang.Class service,
Service implementation)
DialogServiceAccessDialogServiceAccess.getServiceDirect(ID, Class); it will be found
only via DialogServiceAccess.findServiceInHierarchy(Class).
Please note, that a service interface can eighter be registered for hierarchical
use (this method) or for direct and hierarchical use
(see #registerService(ID, Class, Service)).
The last registration overwrites the previous; it is not possible to
register two different implementations: one for hierarchical and one for direct
use!
The service class must be an interface that extend Service,
and the implementation implement that interface.
Please note that a a registered service should be unregistered when the life cycle of the provider ends.
registerServiceForHierarchy in interface DialogServiceAccessservice - the interface that defines the serviceimplementation - the implementation of the serviceDialogServiceAccess.registerServiceForHierarchy(java.lang.Class, com.sdm.quasar.client.core.common.services.Service)
public void unregisterService(java.lang.Class service,
Service implementation)
DialogServiceAccessIf the service is not registered for this node or the given implementation is not the one that is registered, nothing happens.
Therefore, if a service implementation is replaced by another implementation, the unregistering of the first implementation is harmless since the second implementation will stay registered. However, if the second implementation is unregistered first, then no service will be available, even though the first service implementation hasn't been unregistered yet.
unregisterService in interface DialogServiceAccessservice - the interface that defines the serviceimplementation - the registered implementation of the serviceDialogServiceAccess.unregisterService(java.lang.Class, com.sdm.quasar.client.core.common.services.Service)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||