Package com.io7m.idstore.server.internal

# Class IdServer

java.lang.Object
com.io7m.idstore.server.internal.IdServer

All Implemented Interfaces:
  `IdServerType`, `AutoCloseable`

public final class IdServer extends Object implements IdServerType
The main server implementation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdServer(IdServerConfiguration inConfiguration)`
  The main server implementation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `IdDatabaseType`
  `database()`
  `Flow.Publisher<IdServerEventType>`
  `events()`
  `void`
  `setup(Optional<UUID> adminId, IdName adminName, IdEmail adminEmail, IdRealName adminRealName, String adminPassword)`
  Do the work necessary to set up a server instance (such as initializing and/or upgrading the database) but do not actually start the instance.
  `void`
  `start()`
  Start the server instance.

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

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

- ## Constructor Details

  - ### IdServer

    public IdServer(IdServerConfiguration inConfiguration)
    The main server implementation.
    Parameters:
      `inConfiguration` - The server configuration

- ## Method Details

  - ### start

    public void start() throws IdServerException
    Description copied from interface: `IdServerType`
    Start the server instance.
    Specified by:
      `start` in interface `IdServerType`
    Throws:
      `IdServerException` - On errors

  - ### database

    public IdDatabaseType database()
    Specified by:
      `database` in interface `IdServerType`
    Returns:
      The server's database instance

  - ### events

    public Flow.Publisher<IdServerEventType> events()
    Specified by:
      `events` in interface `IdServerType`
    Returns:
      An observable stream of server events

  - ### close

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

  - ### setup

    public void setup(Optional<UUID> adminId, IdName adminName, IdEmail adminEmail, IdRealName adminRealName, String adminPassword) throws IdServerException
    Description copied from interface: `IdServerType`
    Do the work necessary to set up a server instance (such as initializing and/or upgrading the database) but do not actually start the instance.
    Specified by:
      `setup` in interface `IdServerType`
    Parameters:
      `adminId` - The admin ID, if a specific one is required
      `adminName` - The initial administrator to create
      `adminEmail` - The admin email
      `adminRealName` - The admin's real name
      `adminPassword` - The password for the initial administrator
    Throws:
      `IdServerException` - On errors