# Class CSConfigurationService

java.lang.Object
com.io7m.certusine.vanilla.internal.configuration.CSConfigurationService

All Implemented Interfaces:
  `CSConfigurationServiceType, com.io7m.repetoir.core.RPServiceType, AutoCloseable`

public final class CSConfigurationService extends Object implements CSConfigurationServiceType
A configuration service that continually reloads the configuration.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `CSConfiguration`
  `configuration()`
  `static CSConfigurationServiceType`
  `create(CSConfigurationParsersType parsers, Path baseDirectory, Path configurationFile, CSConfiguration configuration)`
  Create a configuration service.
  `String`
  `description()`
  `Flow.Publisher<CSConfiguration>`
  `events()`
  `void`
  `reload()`
  Reload the configuration.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### create

    public static CSConfigurationServiceType create(CSConfigurationParsersType parsers, Path baseDirectory, Path configurationFile, CSConfiguration configuration)
    Create a configuration service.
    Parameters:
      `parsers` - The configuration parsers
      `baseDirectory` - The base directory
      `configurationFile` - The configuration file
      `configuration` - The initial configuration
    Returns:
      A configuration service

  - ### description

    public String description()
    Specified by:
      `description` in interface `com.io7m.repetoir.core.RPServiceType`

  - ### configuration

    public CSConfiguration configuration()
    Specified by:
      `configuration` in interface `CSConfigurationServiceType`
    Returns:
      The most recent configuration

  - ### reload

    public void reload()
    Description copied from interface: `CSConfigurationServiceType`
    Reload the configuration.
    Specified by:
      `reload` in interface `CSConfigurationServiceType`

  - ### events

    public Flow.Publisher<CSConfiguration> events()
    Specified by:
      `events` in interface `CSConfigurationServiceType`
    Returns:
      An event stream that publishes a stream of distinct configuration values

  - ### close

    public void close() throws Exception
    Specified by:
      `close` in interface `AutoCloseable`
    Throws:
      `Exception`