# Class StServer

java.lang.Object
com.io7m.stonesignal.server.internal.StServer

All Implemented Interfaces:
  `StServerType`, `AutoCloseable`

public final class StServer extends Object implements StServerType
The basic server frontend.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StServer(Clock inClock, StConfiguration inConfiguration)`
  The basic server frontend.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `StConfiguration`
  `configuration()`
  `StDatabaseType`
  `database()`
  `boolean`
  `isClosed()`
  `void`
  `start()`
  Start the server instance.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### StServer

    public StServer(Clock inClock, StConfiguration inConfiguration)
    The basic server frontend.
    Parameters:
      `inClock` - The clock
      `inConfiguration` - The server configuration

- ## Method Details

  - ### start

    public void start() throws StException
    Description copied from interface: `StServerType`
    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 `StServerType`
    Throws:
      `StException` - On errors

  - ### database

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

  - ### configuration

    public StConfiguration configuration()
    Specified by:
      `configuration` in interface `StServerType`
    Returns:
      The server's associated configuration

  - ### isClosed

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

  - ### close

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

  - ### toString

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