|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.enterprise.adaptor.Application
public final class Application
Provides framework for adaptors to act as a stand-alone application. This entails creating well-configured HttpServer instances, argument parsing, shutdown handling, and more.
Constructor Summary | |
---|---|
Application(Adaptor adaptor,
Config config)
|
Method Summary | |
---|---|
Config |
getConfig()
Returns the Config used by this instance. |
GsaCommunicationHandler |
getGsaCommunicationHandler()
Returns the GsaCommunicationHandler used by this instance. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Application(Adaptor adaptor, Config config)
Method Detail |
---|
public void start() throws IOException, InterruptedException, StartupException
stop(long, java.util.concurrent.TimeUnit)
for graceful
manual shutdown. A shutdown hook is automatically installed that calls
stop()
.
IOException
InterruptedException
StartupException
public void stop(long time, TimeUnit unit)
public GsaCommunicationHandler getGsaCommunicationHandler()
GsaCommunicationHandler
used by this instance.
public Config getConfig()
Config
used by this instance.
public static Application main(Adaptor adaptor, String[] args)
start()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |