net.esper.filter
Class FilterServiceImpl

java.lang.Object
  extended by net.esper.filter.FilterServiceImpl
All Implemented Interfaces:
FilterService

public final class FilterServiceImpl
extends Object
implements FilterService

Implementation of the filter service interface. Does not allow the same filter callback to be added more then once.


Constructor Summary
protected FilterServiceImpl()
          Constructor.
 
Method Summary
 void add(FilterValueSet filterValueSet, FilterCallback filterCallback)
          Add a filter for events as defined by the filter specification, and register a callback to be invoked upon evaluation of an event that matches the filter spec.
 void evaluate(EventBean eventBean)
          Finds matching filters to the event passed in and invokes their associated callback method.
 int getNumEventsEvaluated()
          Return a count of the number of events evaluated by this service.
 void remove(FilterCallback filterCallback)
          Remove a filter callback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterServiceImpl

protected FilterServiceImpl()
Constructor.

Method Detail

add

public final void add(FilterValueSet filterValueSet,
                      FilterCallback filterCallback)
Description copied from interface: FilterService
Add a filter for events as defined by the filter specification, and register a callback to be invoked upon evaluation of an event that matches the filter spec.

Specified by:
add in interface FilterService
Parameters:
filterValueSet - is a specification of filter parameters, contains event type information, event property values and operators
filterCallback - is the callback to be invoked when the filter matches an event

remove

public final void remove(FilterCallback filterCallback)
Description copied from interface: FilterService
Remove a filter callback.

Specified by:
remove in interface FilterService
Parameters:
filterCallback - is the callback to be removed

evaluate

public final void evaluate(EventBean eventBean)
Description copied from interface: FilterService
Finds matching filters to the event passed in and invokes their associated callback method.

Specified by:
evaluate in interface FilterService
Parameters:
eventBean - is the event to be matched against filters

getNumEventsEvaluated

public final int getNumEventsEvaluated()
Description copied from interface: FilterService
Return a count of the number of events evaluated by this service.

Specified by:
getNumEventsEvaluated in interface FilterService
Returns:
count of invocations of evaluate method