org.norther.tammi.spray.monitor
Class DefaultMonitorFilter

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.spray.filter.DefaultFilter
          extended by org.norther.tammi.spray.filter.DefaultKeyFilter
              extended by org.norther.tammi.spray.monitor.DefaultMonitorFilter
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Filter, Manageable, MBeanDelegate, KeyFilter, MonitorFilter

public class DefaultMonitorFilter
extends DefaultKeyFilter
implements MonitorFilter

A default implementation of MonitorFilter.

Version:
$Id: DefaultMonitorFilter.java,v 1.23 2009/10/21 06:56:03 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
static String MONITOR_KEY
          The default key for the monitor.
 
Fields inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter
DEFAULT_KEY
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Constructor Summary
DefaultMonitorFilter()
          Constructs a new filter.
DefaultMonitorFilter(String key)
          Constructs a new filter with a key.
 
Method Summary
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 Object evaluate(String arg)
          Evaluates a test function.
 boolean match(String expr, String test)
          Matches a regular expression.
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultFilter
destroy, getFilterConfig, getRequestMap, getSessionMap, init
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from interface javax.servlet.Filter
destroy, init
 

Field Detail

MONITOR_KEY

public static final String MONITOR_KEY
The default key for the monitor.

See Also:
Constant Field Values
Constructor Detail

DefaultMonitorFilter

public DefaultMonitorFilter()
Constructs a new filter.


DefaultMonitorFilter

public DefaultMonitorFilter(String key)
Constructs a new filter with a key.

Parameters:
key - the key.
Method Detail

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws ServletException,
                     IOException
Specified by:
doFilter in interface Filter
Overrides:
doFilter in class DefaultFilter
Throws:
ServletException
IOException

match

public boolean match(String expr,
                     String test)
Description copied from interface: MonitorFilter
Matches a regular expression.

Specified by:
match in interface MonitorFilter
Parameters:
expr - the expression.
test - the test.
Returns:
true for a match, false otherwise.

evaluate

public Object evaluate(String arg)
Description copied from interface: MonitorFilter
Evaluates a test function.

Specified by:
evaluate in interface MonitorFilter
Parameters:
arg - an argument.
Returns:
the result.


Copyright © 2004 The Norther Organization. All rights reserved.