Interface ContainerService

All Known Subinterfaces:
HealthStatusProvider, KeyStoreService

public interface ContainerService
The Container is a registry of services, the order of services in a container is important and is determined by the getPriority() value; when starting the Container using the auto service discovery mechanism. If the container is started with an explicit list of services then the insertion order is used.

Service startup lifecycle:

  1. init(org.openremote.model.Container) in registry insertion order
  2. start(org.openremote.model.Container) in registry insertion order

Service shutdown lifecycle:

  1. stop(org.openremote.model.Container) in reverse registry order
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Gets the priority of this service which is used to determine initialization order when services are auto discovered; services with a lower priority are initialized and started first.
    void
    init(Container container)
    All services are initialized in the order they have been added to the container (if container started with explicit list of services) otherwise they are initialized in order of getPriority().
    void
    start(Container container)
    After initialization, services are started in the order they have been added to the container (if container started with explicit list of services) otherwise they are started in order of getPriority().
    void
    stop(Container container)
    When the container is shutting down, it stops all services in the reverse order they were started.
  • Field Details

  • Method Details

    • getPriority

      default int getPriority()
      Gets the priority of this service which is used to determine initialization order when services are auto discovered; services with a lower priority are initialized and started first.
    • init

      void init(Container container) throws Exception
      All services are initialized in the order they have been added to the container (if container started with explicit list of services) otherwise they are initialized in order of getPriority().
      Throws:
      Exception
    • start

      void start(Container container) throws Exception
      After initialization, services are started in the order they have been added to the container (if container started with explicit list of services) otherwise they are started in order of getPriority().
      Throws:
      Exception
    • stop

      void stop(Container container) throws Exception
      When the container is shutting down, it stops all services in the reverse order they were started.
      Throws:
      Exception