public final class Application extends Object
Constructor and Description |
---|
Application(Adaptor adaptor,
Config config) |
Modifier and Type | Method and Description |
---|---|
Config |
getConfig() |
GsaCommunicationHandler |
getGsaCommunicationHandler() |
static Application |
main(Adaptor adaptor,
String[] args)
Main for adaptors to utilize when wanting to act as an application.
|
void |
start()
Start necessary services for receiving requests and managing background
tasks.
|
void |
stop(long time,
TimeUnit unit)
Stop processing incoming requests and background tasks, allowing graceful
shutdown.
|
public void start() throws IOException, InterruptedException
stop(long, java.util.concurrent.TimeUnit)
for graceful
manual shutdown. A shutdown hook is automatically installed that calls
stop()
.IOException
- if failed to startInterruptedException
- if interruptedpublic void stop(long time, TimeUnit unit)
time
- max count given for stop to completeunit
- of measure for the countdownpublic GsaCommunicationHandler getGsaCommunicationHandler()
GsaCommunicationHandler
used by this instance.public static Application main(Adaptor adaptor, String[] args)
start()
.adaptor
- to be initializedargs
- command line params passed to config