Class ServiceRegistryKF

  • All Implemented Interfaces:
    ej.service.ServiceLoader, ej.service.ServiceRegistry

    public class ServiceRegistryKF
    extends ej.service.registry.SimpleServiceRegistry
    implements ej.service.ServiceRegistry
    The Class ServiceRegistryKF which contains the Local Service mapping for each context.
    • Field Summary

      • Fields inherited from class ej.service.loader.SimpleServiceLoader

        services
    • 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> T getService​(java.lang.Class<T> service)  
      <T> void register​(java.lang.Class<T> service, T instance)  
      <T> void register​(java.lang.Class<T> service, T instance, boolean isKernelLocal)
      Registers a Service Instance for the Kernel.
      <T> void unregister​(java.lang.Class<T> service, T instance)  
      <T> void unregister​(java.lang.Class<T> service, T instance, boolean isKernelLocal)
      Unregisters a Service Instance from the Kernel.
      • Methods inherited from class ej.service.loader.SimpleServiceLoader

        checkServicePermission, createAlternativeImplementation, putService
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServiceRegistryKF

        public ServiceRegistryKF()
        Instantiates a new service registry KF.
    • Method Detail

      • getService

        public <T> T getService​(java.lang.Class<T> service)
        Specified by:
        getService in interface ej.service.ServiceLoader
        Overrides:
        getService in class ej.service.loader.SimpleServiceLoader
      • register

        public <T> void register​(java.lang.Class<T> service,
                                 T instance)
        Specified by:
        register in interface ej.service.ServiceRegistry
        Overrides:
        register in class ej.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 service
        instance - the instance of the service
        isKernelLocal - 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:
        unregister in interface ej.service.ServiceRegistry
        Overrides:
        unregister in class ej.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 service
        instance - the instance of the service
        isKernelLocal - if the service should be removed from the local context of the Kernel or shared with other features