Interface ServiceConfigurator<S>

Type Parameters:
S - The configurable service / configuration

public interface ServiceConfigurator<S>
Author:
Filip Hrisafov
  • Field Summary

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

    Modifier and Type
    Method
    Description
    void
    afterInit(S service)
    Called when the service boots up, before it is usable, but after the initialisation of internal objects is done.
    void
    beforeInit(S service)
    Called before any initialisation has been done.
    default int
    When the ServiceConfigurator instances are used, they are first ordered by this priority number (lowest to highest).
  • Field Details

  • Method Details

    • beforeInit

      void beforeInit(S service)
      Called before any initialisation has been done. This can for example be useful to change configuration settings before anything that uses those properties is created. Allows to tweak the service by passing it, which allows tweaking it programmatically.
    • afterInit

      void afterInit(S service)
      Called when the service boots up, before it is usable, but after the initialisation of internal objects is done. Allows to tweak it by passing it, which allows tweaking it programmatically.
    • getPriority

      default int getPriority()
      When the ServiceConfigurator instances are used, they are first ordered by this priority number (lowest to highest). If you have dependencies between ServiceConfigurator instances, use the priorities accordingly to order them as needed.