com.amazonaws.mturk.filter
Class Filter

java.lang.Object
  extended by com.amazonaws.mturk.filter.Filter
Direct Known Subclasses:
ErrorProcessingFilter, FinalFilter, RetryFilter

public abstract class Filter
extends java.lang.Object

Abstract class which handles execution of Filters and also linking them together. User should subclass this for creating their own Filters


Constructor Summary
Filter()
           
 
Method Summary
abstract  Reply execute(Message m)
          Implement this to perform processing on Message and Reply in your Filter
 boolean isRemovable()
          retun true if it can be removed from the chain of filters else false
static void linkFilters(java.util.List<Filter> filterList)
          Sets the nextfilter on each of the Filters
protected  Reply passMessage(Message m)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filter

public Filter()
Method Detail

isRemovable

public boolean isRemovable()
retun true if it can be removed from the chain of filters else false


linkFilters

public static void linkFilters(java.util.List<Filter> filterList)
Sets the nextfilter on each of the Filters

Parameters:
filterList - - list of filters which need to be linked together to form the filter chain

passMessage

protected Reply passMessage(Message m)
                     throws ServiceException
Parameters:
m - - the request message that should be passed to the next filter
Returns:
result of the next filter's execution. throws ServiceException on errors
Throws:
ServiceException

execute

public abstract Reply execute(Message m)
                       throws ServiceException
Implement this to perform processing on Message and Reply in your Filter

Parameters:
m - - request message got from previous filter
Returns:
result of the execution of this filter throws ServiceException on errors
Throws:
ServiceException