edu.uci.isr.yancees.server.filter
Class AbstractFilter

java.lang.Object
  extended byedu.uci.isr.yancees.server.filter.AbstractFilter
All Implemented Interfaces:
FilterInterface
Direct Known Subclasses:
AbstractFilterManager.ResponseCollectorFilter, GenericFilter, InputPerformanceFilter, OutputPerformanceFilter

public abstract class AbstractFilter
extends java.lang.Object
implements FilterInterface

Implements an abstract filter with the basic functionality to the methods of the FilterInterface


Constructor Summary
AbstractFilter()
          constructor
 
Method Summary
 void addSuccessor(FilterInterface filter)
          Adds a successor to the list of filters of this filter
protected abstract  void doFilterEvent(EventInterface evt)
          This method should be implemented by the superclass of the AbstractFilter in order to process the messages being passed through this filter
protected abstract  void doFilterEventList(EventInterface[] evtList)
          This method should be implemented by the superclass of the AbstractFilter in order to process the messages being passed through this filter
 java.lang.String getName()
           
 FilterInterface getSuccessor()
          list all the successors of this filters if any
 void handleMessage(EventInterface evt)
          Handles the incomming message and passes it forward to all the successors of this filter
 void handleMessage(EventInterface[] evtList)
          Handles the incomming message and passes it forward to all the successors of this filter
 void removeSuccessor()
          Remove a filter from the list of successors from this filter
 void setName(java.lang.String name)
          sets the name of this filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFilter

public AbstractFilter()
constructor

Method Detail

handleMessage

public void handleMessage(EventInterface evt)
Handles the incomming message and passes it forward to all the successors of this filter

Specified by:
handleMessage in interface FilterInterface
Parameters:
evt - is the event to process
See Also:
yancees.filter.FilterInterface#handleMessage(yancees.core.MessageInterface)

handleMessage

public void handleMessage(EventInterface[] evtList)
Handles the incomming message and passes it forward to all the successors of this filter

Specified by:
handleMessage in interface FilterInterface
Parameters:
evtList - is the list of events to process
See Also:
yancees.filter.FilterInterface#handleMessage(yancees.core.MessageInterface)

doFilterEvent

protected abstract void doFilterEvent(EventInterface evt)
This method should be implemented by the superclass of the AbstractFilter in order to process the messages being passed through this filter


doFilterEventList

protected abstract void doFilterEventList(EventInterface[] evtList)
This method should be implemented by the superclass of the AbstractFilter in order to process the messages being passed through this filter

Parameters:
evtList - is a list of events to be filtered as a "burst"

addSuccessor

public void addSuccessor(FilterInterface filter)
Adds a successor to the list of filters of this filter

Specified by:
addSuccessor in interface FilterInterface
Parameters:
filter - is the next filter to receive the message
See Also:
yancees.filter.FilterInterface#addSucessor(yancees.filter.FilterInterface)

removeSuccessor

public void removeSuccessor()
Remove a filter from the list of successors from this filter

Specified by:
removeSuccessor in interface FilterInterface
See Also:
yancees.filter.FilterInterface#removeSucessor(yancees.filter.FilterInterface)

getSuccessor

public FilterInterface getSuccessor()
list all the successors of this filters if any

Specified by:
getSuccessor in interface FilterInterface
Returns:
a list of filgers or an empty list if no successors are registered
See Also:
yancees.filter.FilterInterface#getSucessorsList()

getName

public java.lang.String getName()
Specified by:
getName in interface FilterInterface
Returns:
the name of this filter
See Also:
yancees.filter.FilterInterface#getName()

setName

public void setName(java.lang.String name)
Description copied from interface: FilterInterface
sets the name of this filter

Specified by:
setName in interface FilterInterface
Parameters:
name -