Class ServerMain

java.lang.Object
edu.uky.cs.nil.tt.ServerMain

public class ServerMain extends Object
The main entry point for the Tandem Tales server. This class includes the main method to launch the server and its components.
Author:
Stephen G. Ware
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The key used to specify that the server should read or save a database of story worlds and agents
    static final String
    The default location of the database file, if one is not specified
    static final String
    The default location of the log file, if one is not specified
    static final int
    The default port the server will listen on, if one is not specified
    static final String
    The default location of the session log directory, if one is not specified
    static final String
    The key used to print the usage instructions
    static final String
    The key used to specify that server messages should be logged to file
    static final String
    The key used to specify on which port the server should listen
    static final String
    The key used to specify that sessions should be logged to file
    static final String
    Usage instructions for the server executable
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Configure and run a server based on Java arguments passed from the terminal.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HELP_KEY

      public static final String HELP_KEY
      The key used to print the usage instructions
      See Also:
    • LOG_KEY

      public static final String LOG_KEY
      The key used to specify that server messages should be logged to file
      See Also:
    • DEFAULT_LOG_FILE

      public static final String DEFAULT_LOG_FILE
      The default location of the log file, if one is not specified
      See Also:
    • SESSIONS_KEY

      public static final String SESSIONS_KEY
      The key used to specify that sessions should be logged to file
      See Also:
    • DEFAULT_SESSIONS_DIRECTORY

      public static final String DEFAULT_SESSIONS_DIRECTORY
      The default location of the session log directory, if one is not specified
      See Also:
    • DATABASE_KEY

      public static final String DATABASE_KEY
      The key used to specify that the server should read or save a database of story worlds and agents
      See Also:
    • DEFAULT_DATABASE_FILE

      public static final String DEFAULT_DATABASE_FILE
      The default location of the database file, if one is not specified
      See Also:
    • PORT_KEY

      public static final String PORT_KEY
      The key used to specify on which port the server should listen
      See Also:
    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      The default port the server will listen on, if one is not specified
      See Also:
    • USAGE

      public static final String USAGE
      Usage instructions for the server executable
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Configure and run a server based on Java arguments passed from the terminal.
      Parameters:
      args - the arguments passed to this executable
      Throws:
      Exception - if a problem occurs during the server setup or while it is running