Class Server

java.lang.Object
org.veupathdb.lib.container.jaxrs.server.Server

public abstract class Server extends Object
  • Constructor Details

    • Server

      public Server()
  • Method Details

    • newOptions

      protected Options newOptions()
      Creates a new Options object and returns it.
      Returns:
      newly created options object.
    • newResourceConfig

      protected abstract ContainerResources newResourceConfig(Options opts)
      Creates a new ContainerResources object which will be used to configure the Grizzly HttpServer.

      This method is called after dependency and database initialization.

      Returns:
      newly created ContainerResources subclass.
    • dependencies

      protected Dependency[] dependencies()
      Extension point for registering external dependencies.
      Returns:
      An array of dependencies to register with the DependencyProvider.
    • onShutdown

      protected void onShutdown()
      Called on server shutdown to perform any tasks assigned by the overriding subclass.
    • postCliParse

      protected void postCliParse(Options opts)
      Hook-point for performing tasks after the CLI/Environment configuration has been parsed.

      This method will be called before the server is started and before any of the built-in DB connections are established.

    • postAcctDb

      protected void postAcctDb()
    • postUserDb

      protected void postUserDb()
    • postAppDb

      protected void postAppDb()
    • postStartup

      protected void postStartup()
      Hook-point for performing tasks after the service has started up.
    • enableAccountDB

      protected final Server enableAccountDB()
      Enables access to the account database. If this is set, the ACCT_DB_* cli options or environment variables must be set.
      Returns:
      Updated server instance.
    • enableApplicationDB

      protected final Server enableApplicationDB()
      Enables access to the application database. If this is set, the ACCT_DB_* cli options or environment variables must be set.
      Returns:
      Updated server instance.
    • enableUserDB

      protected final Server enableUserDB()
      Enables access to the user database. If this is set, the ACCT_DB_* cli options or environment variables must be set.
      Returns:
      Updated server instance.
    • enableUserQuerying

      protected final Server enableUserQuerying()
      Enables querying of users' data on the OAuth server by either user IDs or by user emails. If enabled, two additional configuration values are required: oauth-client-id and oauth-client-secret
      Returns:
      Updated server instance.
    • getInstance

      public static Server getInstance()
    • start

      protected final void start(String[] cliArgs)
      Start up the HTTP server.
      Parameters:
      cliArgs - commandline arguments
    • getGrizzlyServer

      protected final org.glassfish.grizzly.http.server.HttpServer getGrizzlyServer()