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, FilterHandle 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 destroy()
          Destroy the service.
 void evaluate(EventBean eventBean, Collection<FilterHandle> matches)
          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(FilterHandle 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

destroy

public void destroy()
Description copied from interface: FilterService
Destroy the service.

Specified by:
destroy in interface FilterService

add

public final void add(FilterValueSet filterValueSet,
                      FilterHandle 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(FilterHandle 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,
                           Collection<FilterHandle> matches)
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
matches - is a collection that is populated via add method with any handles for matching 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

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com