public interface ModuleServicesManager
Modifier and Type | Method and Description |
---|---|
<T extends ModuleService> |
getService(java.lang.Class<T> serviceClass)
Retrieves a ModuleService indicated by the given serviceClass.
|
void |
notifyServiceReady(ModuleService service)
To be called by ModuleService's after they are first ready for use.
|
void |
notifyServiceShutdown(ModuleService service)
To be called by ModuleService's when they are no longer ready for use.
|
void |
registerService(java.lang.Class<? extends ModuleService> serviceClass,
ModuleService service)
Registers a ModuleService for use.
|
void |
subscribe(java.lang.Class<? extends ModuleService> serviceClass,
ModuleServiceConsumer consumer)
Indicate that the given ModuleServiceConsumer is interested in using the ModuleService
indicated by serviceClass.
|
void |
unregisterService(java.lang.Class<? extends ModuleService> serviceClass)
Unregisters a ModuleService with the given serviceClass.
|
void |
unsubscribe(java.lang.Class<? extends ModuleService> serviceClass,
ModuleServiceConsumer consumer)
Indicate that the given ModuleServiceConsumer is no longer interested in the ModuleService
indicated by serviceClass.
|
void registerService(java.lang.Class<? extends ModuleService> serviceClass, ModuleService service)
serviceClass
- The Class ModuleConsumer's will request this service by.service
- The ModuleService provided.void unregisterService(java.lang.Class<? extends ModuleService> serviceClass)
serviceClass
- The ModuleService Class to unregister.<T extends ModuleService> T getService(java.lang.Class<T> serviceClass)
serviceClass
- The Class linked to the desired ModuleService.void subscribe(java.lang.Class<? extends ModuleService> serviceClass, ModuleServiceConsumer consumer)
serviceClass
- The Class used to indicate the ModuleService.consumer
- ModuleServiceConsumer interested in the ModuleService.void unsubscribe(java.lang.Class<? extends ModuleService> serviceClass, ModuleServiceConsumer consumer)
serviceClass
- The Class used to indicate the ModuleService.consumer
- ModuleServiceConsumer to unsubscribe.void notifyServiceReady(ModuleService service)
service
- ModuleService that is ready.void notifyServiceShutdown(ModuleService service)
service
- ModuleService that is no longer ready for use.