org.echarts.monitor
Class MachineMonitorEventFilter
java.lang.Object
org.echarts.monitor.MachineMonitorEventFilter
- All Implemented Interfaces:
- java.io.Serializable
public class MachineMonitorEventFilter
- extends java.lang.Object
- implements java.io.Serializable
Event filter used by event monitors when determining whether or not
to log an event.
A monitor event filter string is provided as a constructor argument
and parsed to form the filter. The filter string grammar is:
A filter string is a list of filter disjuncts separated by '|'. If
an event passes through at least one filter disjunct then it is
defined to have passed through the entire filter. If a 'null'
filter string is specified, then all events are defined to pass
through the filter.
FILTER_STRING ::= FILTER_DISJUNCT ( '|' FILTER_DISJUNCT )*
A filter disjunct consists of a series of class filters. If an
event passes through all class filters then it is defined to have
passed through the filter disjunct.
FILTER_DISJUNCT ::= ( CLASS_FILTER )+
A class filter consists of a 'pass' term, either '+' or '-', a
(fully qualified) class name, and an optional list of property
filters. If the pass term is '+', then the event is defined to have
passed through the class filter is the event class is a subclass of
the class specified by the class name, and if the event passes
through all of the property filters. If the pass term is '-', then
the event is defined to have passed through the filter if it would
have not passed if the pass term were '+'.
CLASS_FILTER ::= PASS CLASS_NAME ( PROP_FILTER )*
A property filter consists of a property name and a regular
expression. An event is defined to have passed through the property
filter if the value of the named event property matches the regular
expression. The regular expression conforms to the sytax and
semantics used by the org.apache.regexp package.
PROP_FILTER ::= '?' PROP_NAME '=' '(' REGEXP ')'
- See Also:
- Serialized Form
Method Summary |
boolean |
passes(MachineMonitorEvent event)
Specified event must pass through at least one of the filter
disjuncts. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
MachineMonitorEventFilter
public MachineMonitorEventFilter(java.lang.String filterString)
throws MalformedEventFilterStringException
- Throws:
MalformedEventFilterStringException
passes
public boolean passes(MachineMonitorEvent event)
- Specified event must pass through at least one of the filter
disjuncts.