Package com.io7m.idstore.server.service.maintenance

# Class IdClosedForMaintenanceService

java.lang.Object
com.io7m.idstore.server.service.maintenance.IdClosedForMaintenanceService

All Implemented Interfaces:
  `com.io7m.repetoir.core.RPServiceType`

public final class IdClosedForMaintenanceService extends Object implements com.io7m.repetoir.core.RPServiceType
A service that allows toggling the server into maintenance mode.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdClosedForMaintenanceService(IdMetricsServiceType inMetrics)`
  A service that allows toggling the server into maintenance mode.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `closeForMaintenance(String messageText)`
  The server is now closed for maintenance.
  `String`
  `description()`
  `Optional<String>`
  `isClosed()`
  `void`
  `openForBusiness()`
  The server is now open for business.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

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

- ## Constructor Details

  - ### IdClosedForMaintenanceService

    public IdClosedForMaintenanceService(IdMetricsServiceType inMetrics)
    A service that allows toggling the server into maintenance mode.
    Parameters:
      `inMetrics` - The metrics service

- ## Method Details

  - ### openForBusiness

    public void openForBusiness()
    The server is now open for business.

  - ### closeForMaintenance

    public void closeForMaintenance(String messageText)
    The server is now closed for maintenance.
    Parameters:
      `messageText` - The message text

  - ### isClosed

    public Optional<String> isClosed()
    Returns:
      A message indicating the server is closed, if it is

  - ### description

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

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`