Package com.io7m.idstore.server.vanilla.internal

# Class IdServer

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

All Implemented Interfaces:
  `IdServerType`, `AutoCloseable`

public final class IdServer extends Object implements IdServerType
The basic server frontend.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdServer(IdServerConfiguration inConfiguration)`
  The basic server frontend.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `IdDatabaseType`
  `database()`
  `boolean`
  `isClosed()`
  `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 basic server frontend.
    Parameters:
      `inConfiguration` - The server configuration

- ## Method Details

  - ### start

    public void start() throws IdServerException
    Description copied from interface: `IdServerType`
    Start the server instance. Can be called multiple times redundantly, and can be called before or after #close() has been called.
    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

  - ### isClosed

    public boolean isClosed()
    Specified by:
      `isClosed` in interface `IdServerType`
    Returns:
      `true` if the server is closed
    See Also:
      - `IdServerType.start()`
      - `IdServerType.close()`

  - ### 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