Package com.microej.kf.util.service
Class ServiceRegistryKF
- java.lang.Object
-
- ej.service.loader.SimpleServiceLoader
-
- ej.service.registry.SimpleServiceRegistry
-
- com.microej.kf.util.service.ServiceRegistryKF
-
- All Implemented Interfaces:
ej.service.ServiceLoader,ej.service.ServiceRegistry
public class ServiceRegistryKF extends ej.service.registry.SimpleServiceRegistry implements ej.service.ServiceRegistryThe Class ServiceRegistryKF which contains the Local Service mapping for each context.
-
-
Constructor Summary
Constructors Constructor Description ServiceRegistryKF()Instantiates a new service registry KF.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetService(java.lang.Class<T> service)<T> voidregister(java.lang.Class<T> service, T instance)<T> voidregister(java.lang.Class<T> service, T instance, boolean isKernelLocal)Registers a Service Instance for the Kernel.<T> voidunregister(java.lang.Class<T> service, T instance)<T> voidunregister(java.lang.Class<T> service, T instance, boolean isKernelLocal)Unregisters a Service Instance from the Kernel.
-
-
-
Method Detail
-
getService
public <T> T getService(java.lang.Class<T> service)
- Specified by:
getServicein interfaceej.service.ServiceLoader- Overrides:
getServicein classej.service.loader.SimpleServiceLoader
-
register
public <T> void register(java.lang.Class<T> service, T instance)- Specified by:
registerin interfaceej.service.ServiceRegistry- Overrides:
registerin classej.service.registry.SimpleServiceRegistry
-
register
public <T> void register(java.lang.Class<T> service, T instance, boolean isKernelLocal)Registers a Service Instance for the Kernel.- Parameters:
service- the class type of the serviceinstance- the instance of the serviceisKernelLocal- if the service should be stored in the local context of the Kernel or shared with other features
-
unregister
public <T> void unregister(java.lang.Class<T> service, T instance)- Specified by:
unregisterin interfaceej.service.ServiceRegistry- Overrides:
unregisterin classej.service.registry.SimpleServiceRegistry
-
unregister
public <T> void unregister(java.lang.Class<T> service, T instance, boolean isKernelLocal)Unregisters a Service Instance from the Kernel.- Parameters:
service- the class type of the serviceinstance- the instance of the serviceisKernelLocal- if the service should be removed from the local context of the Kernel or shared with other features
-
-