public class BasicRequestTrackerPlugin extends DmpServletPlugin implements RequestTrackerIF
cache, pluginConfig, pluginManager, servlet| Constructor and Description |
|---|
BasicRequestTrackerPlugin()
Constructs a new RequestTrackerPlugin.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindDefaultRequestHandler(DmpRequestProcessorIF requestHandler)
This method allows you to bind a fall back request handler that will be called in
the case that no handler has been bound for a particular class of request.
|
void |
bindRequestProcessor(Class<? extends org.dmd.dmp.server.extended.Request> clazz,
DmpRequestProcessorIF requestProcessor)
This method binds a request processor to a particular class that's derived from the
the DMP Request class.
|
int |
processRequest(org.dmd.dmp.server.extended.Request req,
DmpResponseHandlerIF responseHandler)
This method allows you to submit a request and receive asynchronous responses via the
response handler.
|
int |
processRequest(org.dmd.dmp.server.extended.Request req,
DmpResponseHandlerIF responseHandler,
int timeoutSeconds)
This method allows you to submit a request with a specified timeout value.
|
void |
processResponse(org.dmd.dmp.server.extended.Response resp)
When a request handler has a response available, it sends it back to the RequestTracker via this method.
|
org.dmd.dmp.server.extended.Response |
processSynchronousRequest(org.dmd.dmp.server.extended.Request req,
DmpResponseHandlerIF asyncResponseHandler,
int timeoutSeconds)
This method allows for synchronous processing of a request; this is generally used when
service DMP requests that arrive via GWT RPC.
|
getID, getPluginName, init, preInit, setManagerAndConfig, shutdown, startpublic BasicRequestTrackerPlugin()
public void bindDefaultRequestHandler(DmpRequestProcessorIF requestHandler)
bindDefaultRequestHandler in interface RequestTrackerIFrequestHandler - the handler to call when a Request doesn't have a bound handlerpublic void bindRequestProcessor(Class<? extends org.dmd.dmp.server.extended.Request> clazz, DmpRequestProcessorIF requestProcessor)
bindRequestProcessor in interface RequestTrackerIFclazz - The class of Request handled by the processor.requestProcessor - The request processor.public int processRequest(org.dmd.dmp.server.extended.Request req,
DmpResponseHandlerIF responseHandler)
processRequest in interface RequestTrackerIFreq - The request.responseHandler - Where to send the responses.public org.dmd.dmp.server.extended.Response processSynchronousRequest(org.dmd.dmp.server.extended.Request req,
DmpResponseHandlerIF asyncResponseHandler,
int timeoutSeconds)
processSynchronousRequest in interface RequestTrackerIFreq - The request.asyncResponseHandler - The handler that will handle any responses beyond the first one.timeoutSeconds - The timeout. This should be less than the standard HTTP session timeout.public int processRequest(org.dmd.dmp.server.extended.Request req,
DmpResponseHandlerIF responseHandler,
int timeoutSeconds)
processRequest in interface RequestTrackerIFreq - The request.responseHandler - Where to send the response.timeoutSeconds - The time out delay.public void processResponse(org.dmd.dmp.server.extended.Response resp)
processResponse in interface RequestTrackerIFresp - A response for an outstanding request.Copyright © 2019. All rights reserved.