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()  | 
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.server - serves documentsdashboardServer - serves dashboardcontextPrefix - prefixIOException - ioeInterruptedException - if interruptedpublic void start(Runnable shutdownHook)
shutdownHook - shutdonw hookpublic boolean stop(long time,
                    TimeUnit unit)
maxDelay seconds
 for things to shutdown. After called, no requests will be sent to the
 Adaptor.time - timeunit - unitstrue 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()