com.plumtree.uiinfrastructure.interpreter.filter
Class RequestQueueFilter
java.lang.Object
com.plumtree.uiinfrastructure.interpreter.filter.BaseInterpreterFilter
com.plumtree.uiinfrastructure.interpreter.filter.RequestQueueFilter
- All Implemented Interfaces:
- IInterpreterFilter
public class RequestQueueFilter
- extends BaseInterpreterFilter
A filter to check if there are too many requests queued up on
this session already. If it is, the PreFilter method will thrown an
InterpreterException with message: The server is busy processing your
previous request. Otherwise, the PreFilter method will put this request
into the request queue.
- Author:
- Don Hayler, WilliamA (Writing this new class)
Method Summary |
void |
PostFilter(RequestData requestData)
This method removes the current request from the
pending-request queue. |
boolean |
PreFilter(RequestData requestData)
This method prevents too many request on the session. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestQueueFilter
public RequestQueueFilter()
PreFilter
public boolean PreFilter(RequestData requestData)
- This method prevents too many request on the session. It uses a queue
to keep track how many pending request currently on the session.
- Specified by:
PreFilter
in interface IInterpreterFilter
- Overrides:
PreFilter
in class BaseInterpreterFilter
- Parameters:
requestData
- The request to be processed.
- Returns:
- a boolean indicating whether the request should be filtered out.
A boolean true indicates that the filter has performed the necessary
processing for the request and the Interpreter shall not do any
further processing of it.
PostFilter
public void PostFilter(RequestData requestData)
- This method removes the current request from the
pending-request queue.
- Specified by:
PostFilter
in interface IInterpreterFilter
- Overrides:
PostFilter
in class BaseInterpreterFilter
- Parameters:
requestData
- The request.