Class InitialisedInjectedService

java.lang.Object
de.aristaflow.adept2.core.registry.InjectedADEPT2Service
de.aristaflow.adept2.core.registry.InitialisedInjectedService
All Implemented Interfaces:
ADEPT2Service, LogService, ServiceThreadHandling
Direct Known Subclasses:
AuthenticatedInjectedService

@ConfigurationDescription(properties=) public class InitialisedInjectedService extends InjectedADEPT2Service implements LogService, ServiceThreadHandling
This class is similar to AbstractADEPT2Service. The main difference is that the injected service has constructors without a configuration and a registry. Both are provided when this service is initialised by the platform. This is also an additional step in the lifecycle of this service. Before this initialisation, most features will not work properly, e. g. session tracking since this requires a registry. Check with isInitialised() whether the injected service is usable. Methods that usually wait for this service to be started, will not block but throw an exception before the initialisation. This is similar to their behaviour after the service has been shut down.
  • Field Details

  • Constructor Details

    • InitialisedInjectedService

      public InitialisedInjectedService(Logger logger)
      Creates an injected service that can be initialised by the platform. It assumes that there are no other services required.
      Parameters:
      logger - The logger which to use for this service. This will only be used until initialisation by the platform. Afterwards the logger of the AbstractADEPT2Service will be used.
    • InitialisedInjectedService

      public InitialisedInjectedService(Logger logger, String[] startupRequiredServices, String[] runtimeRequiredServices, Class<?> cls)
      Creates an injected service that can be initialised by the platform. It uses the designated services from the platform.
      Parameters:
      logger - The logger which to use for this service. This will only be used until initialisation by the platform. Afterwards the logger of the AbstractADEPT2Service will be used.
      startupRequiredServices - The service type names of services required at startup time (in init(URI[], URI[]) and start()). This may be null.
      runtimeRequiredServices - The service type names of services required at runtime (after startup time). This may be null.
      cls - The class which to use for the logger provided by AbstractADEPT2Service, this is usually the interface of the service.
  • Method Details