org.iges.anagram.filter
Class OverloadFilter

java.lang.Object
  |
  +--org.iges.anagram.AbstractModule
        |
        +--org.iges.anagram.filter.Filter
              |
              +--org.iges.anagram.filter.OverloadFilter
All Implemented Interfaces:
Module

public class OverloadFilter
extends Filter

Tracks the number of simultaneous requests, and blocks those that exceed the server's limit.


Field Summary
protected  int currentLoad
           
protected  int limit
           
protected  int maxLoad
           
 
Fields inherited from class org.iges.anagram.filter.Filter
enabled, filterName, moduleID, next
 
Fields inherited from class org.iges.anagram.AbstractModule
log, moduleName, parent, server
 
Constructor Summary
OverloadFilter()
           
 
Method Summary
 void configure(Setting setting)
          Configures the module according to the settings provided.
 void doFilter(ClientRequest clientRequest)
           
 java.lang.String getFilterName()
          The name of this filter.
 
Methods inherited from class org.iges.anagram.filter.Filter
getModuleID, handle, isEnabled, setEnabled, setNext
 
Methods inherited from class org.iges.anagram.AbstractModule
configModule, debug, debug, error, fail, fail, fail, getModuleName, info, init, toString, verbose, verbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

limit

protected int limit

currentLoad

protected int currentLoad

maxLoad

protected int maxLoad
Constructor Detail

OverloadFilter

public OverloadFilter()
Method Detail

getFilterName

public java.lang.String getFilterName()
Description copied from class: Filter
The name of this filter. Used to build the module ID

Specified by:
getFilterName in class Filter

configure

public void configure(Setting setting)
               throws ConfigException
Description copied from class: AbstractModule
Configures the module according to the settings provided. The server supports dynamic reconfiguration. Thus this method may be called at any time in the life of the module. If the module cannot be reconfigured, it should throw an exception.

Specified by:
configure in interface Module
Overrides:
configure in class Filter
ConfigException

doFilter

public void doFilter(ClientRequest clientRequest)
              throws ModuleException
Specified by:
doFilter in class Filter
ModuleException