com.plumtree.uiinfrastructure.interpreter.filter
Class RequestQueueFilter

java.lang.Object
  extended by com.plumtree.uiinfrastructure.interpreter.filter.BaseInterpreterFilter
      extended by 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)

Constructor Summary
RequestQueueFilter()
           
 
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
 

Constructor Detail

RequestQueueFilter

public RequestQueueFilter()
Method Detail

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.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.