|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Manages Services. ServiceManager extends
ServiceProvider, that capsulates the read-only view to the
managed services.
This service manager does not support a hierarchy.
A service is identified by a class object: the interface that defines the service. That interface must extendService.
The implementation must be an object that implements that concrete
interface (see {@link #registerService(Class, Service)}).
Note: A service interface that extends another service interface will be considered as a different service.
Note: Implementations of this interface must be threadsafe and be aware that while executing one method the same or any other method may be called again by the same or another thread. Avoid implementations that might deadlock.
| Method Summary | |
void |
registerService(java.lang.Class service,
Service implementation)
Registers a service with the manager. |
void |
replaceService(java.lang.Class service,
Service implementation)
Works like registerService(Class, Service), but overwrites
any existing service mapping. |
void |
unregisterService(java.lang.Class service,
Service implementation)
Unregisters a service. |
| Methods inherited from interface com.sdm.quasar.client.core.common.services.ServiceProvider |
getService, hasService |
| Method Detail |
public void registerService(java.lang.Class service,
Service implementation)
Note that a service should be unregistered before the life cycle of its provider ends.
service - the interface that defines the serviceimplementation - the object implementing the service
java.lang.IllegalArgumentException - if any argument is null
or a service mapping already exists for the service key class.
public void replaceService(java.lang.Class service,
Service implementation)
registerService(Class, Service), but overwrites
any existing service mapping.
service - the interface that defines the serviceimplementation - the object implementing the service
java.lang.IllegalArgumentException - if any argument is null
public void unregisterService(java.lang.Class service,
Service implementation)
service - the interface that defines the serviceimplementation - the object implementing the service
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||