|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.services.AbstractHandler
org.deegree_impl.services.wfs.Dispatcher_Impl
The dispatcher acts as source of events to inform registered WFSResponseListener as well as a reciever of requests that have to be performed by one of the registered DataStores (also definied as WFSRequestListener).
The class works as follows: When the first request is pushed to the dispatcher to loops are started that ckecks continously in defined time intervals (frequency) if new request and/or responses are present for processing. If so the request/response is take from the container it has been pushed to and will be deligated to the class that's responsible for its processing.
If for a defined time interval (timeout) no request/response has been pushed to the dispatcher the processing loops will be stopped. This also happens if a thread based exception will be throwen during the request/response processing.
-----------------------------------------------------
Nested Class Summary | |
private class |
Dispatcher_Impl.RequestLoop
inner class for processing requests |
private class |
Dispatcher_Impl.ResponseLoop
inner class for processing WFS responses to requests |
Nested classes inherited from class org.deegree_impl.services.AbstractHandler |
AbstractHandler.Loop |
Field Summary | |
protected java.util.Map |
reqControl
|
protected AbstractHandler.Loop |
reqThread
|
protected java.util.List |
requests
container for requests to be performed |
protected java.util.List |
responses
container for responses to request that has be performed |
protected AbstractHandler.Loop |
resThread
|
Fields inherited from class org.deegree_impl.services.AbstractHandler |
handlerList, inProgressList, loopFrequency, loopTimeout, requestList, responseList, responseTimeout, timestamp |
Constructor Summary | |
Dispatcher_Impl()
|
Method Summary | |
protected OGCWebServiceRequest |
getNextRequest()
returns the next request to be processed. |
protected OGCWebServiceResponse |
getNextResponse()
returns the next response to be processed. |
void |
handleRequest(OGCWebServiceEvent event)
recieves a request that should be performed by the Dispatcher. |
void |
handleResponse(OGCWebServiceEvent event)
recieves the response to a request that been performed by the Dispatcher.The Dispatcher will analyse the response and notify the responsible methods/classes. |
boolean |
isInterested(OGCWebServiceEvent event)
returns true if the handler is interested in a event |
private void |
performOGCWebServiceException(java.lang.String message,
java.lang.String location)
creates an exception that should be used instead of a response if the performing of a request failed. |
protected void |
process()
this method is called within the loop. |
protected void |
startProcessingRequests()
starts the loop for processing requests and responses |
protected void |
startProcessingResponses()
starts the loop for processing requests and responses |
void |
stopLoops()
stops the processing loop(s) |
Methods inherited from class org.deegree_impl.services.AbstractHandler |
dispose, fireRequest, fireResponse, registerHandler, removeHandler, setLoopFrequency, setLoopTimeout, setResponseTimeout |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.deegree.services.Handler |
registerHandler, removeHandler |
Field Detail |
protected java.util.Map reqControl
protected java.util.List requests
protected java.util.List responses
protected AbstractHandler.Loop reqThread
protected AbstractHandler.Loop resThread
Constructor Detail |
public Dispatcher_Impl()
Method Detail |
public void handleRequest(OGCWebServiceEvent event)
handleRequest
in interface Handler
public void handleResponse(OGCWebServiceEvent event)
handleResponse
in interface Handler
public boolean isInterested(OGCWebServiceEvent event)
isInterested
in interface Handler
protected void startProcessingRequests()
protected void startProcessingResponses()
public void stopLoops()
stopLoops
in class AbstractHandler
protected OGCWebServiceRequest getNextRequest()
protected OGCWebServiceResponse getNextResponse()
private void performOGCWebServiceException(java.lang.String message, java.lang.String location)
protected void process()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |