Class Server
java.lang.Object
org.veupathdb.lib.container.jaxrs.server.Server
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Dependency[]
Extension point for registering external dependencies.protected final Server
Enables access to the account database.protected final Server
Enables access to the application database.protected final Server
Enables access to the user database.protected final Server
Enables querying of users' data on the OAuth server by either user IDs or by user emails.protected final org.glassfish.grizzly.http.server.HttpServer
static Server
protected Options
Creates a new Options object and returns it.protected abstract ContainerResources
newResourceConfig
(Options opts) Creates a new ContainerResources object which will be used to configure the GrizzlyHttpServer
.protected void
Called on server shutdown to perform any tasks assigned by the overriding subclass.protected void
protected void
protected void
postCliParse
(Options opts) Hook-point for performing tasks after the CLI/Environment configuration has been parsed.protected void
Hook-point for performing tasks after the service has started up.protected void
protected final void
Start up the HTTP server.
-
Constructor Details
-
Server
public Server()
-
-
Method Details
-
newOptions
Creates a new Options object and returns it.- Returns:
- newly created options object.
-
newResourceConfig
Creates a new ContainerResources object which will be used to configure the GrizzlyHttpServer
.This method is called after dependency and database initialization.
- Returns:
- newly created ContainerResources subclass.
-
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
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
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
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
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
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
-
start
Start up the HTTP server.- Parameters:
cliArgs
- commandline arguments
-
getGrizzlyServer
protected final org.glassfish.grizzly.http.server.HttpServer getGrizzlyServer()
-