public final class GsaCommunicationHandler extends Object
| Constructor and Description |
|---|
GsaCommunicationHandler(Adaptor adaptor,
Config config) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAndScheduleImmediatePushOfDocIds()
Ensure there is a push running right now.
|
boolean |
checkAndScheduleIncrementalPushOfDocIds()
Perform an push of incremental changes.
|
Adaptor |
getAdaptor()
The adaptor instance being used.
|
AdaptorContext |
setup(HttpServer server,
HttpServer dashboardServer,
String contextPrefix)
Start services necessary for handling outgoing requests.
|
void |
start(Runnable shutdownHook)
Start servicing incoming requests.
|
boolean |
stop(long time,
TimeUnit unit)
Stops servicing incoming requests, allowing up to
maxDelay seconds
for things to shutdown. |
void |
teardown()
Stop services necessary for handling outgoing requests.
|
public AdaptorContext setup(HttpServer server, HttpServer dashboardServer, String contextPrefix) throws IOException, InterruptedException
"" is used
for contextPrefix if the passed value is null.IOExceptionInterruptedExceptionpublic void start(Runnable shutdownHook)
public boolean stop(long time,
TimeUnit unit)
maxDelay seconds
for things to shutdown. After called, no requests will be sent to the
Adaptor.true if shutdown cleanly, false if requests may
still be processingpublic void teardown()
AdaptorContext returned from setup(com.sun.net.httpserver.HttpServer, com.sun.net.httpserver.HttpServer, java.lang.String).public boolean checkAndScheduleImmediatePushOfDocIds()
true if it starts a new push, and
false otherwise.public boolean checkAndScheduleIncrementalPushOfDocIds()
PollingIncrementalLister.public Adaptor getAdaptor()