org.eclipse.jetty.monitor.triggers
Class LessThanAttrEventTrigger<TYPE extends Comparable<TYPE>>

java.lang.Object
  extended by org.eclipse.jetty.monitor.jmx.EventTrigger
      extended by org.eclipse.jetty.monitor.triggers.AttrEventTrigger<TYPE>
          extended by org.eclipse.jetty.monitor.triggers.LessThanAttrEventTrigger<TYPE>

public class LessThanAttrEventTrigger<TYPE extends Comparable<TYPE>>
extends AttrEventTrigger<TYPE>

LessThanAttrEventTrigger Event trigger that polls a value of an MXBean attribute and checks if it is greater than specified max value.


Field Summary
protected  TYPE _max
           
 
Fields inherited from class org.eclipse.jetty.monitor.triggers.AttrEventTrigger
_attributeName, _objectName, _states
 
Constructor Summary
LessThanAttrEventTrigger(String objectName, String attributeName, TYPE max)
          Construct event trigger and specify the MXBean attribute that will be polled by this event trigger as well as max value of the attribute.
 
Method Summary
 boolean match(Comparable<TYPE> value)
          Compare the value of the MXBean attribute being polling to check if it is less than the min value.
 String toString()
          Returns the string representation of this event trigger in the format "name
 
Methods inherited from class org.eclipse.jetty.monitor.triggers.AttrEventTrigger
getNameString, getSaveAll, getState, getValue, match
 
Methods inherited from class org.eclipse.jetty.monitor.jmx.EventTrigger
getID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_max

protected final TYPE extends Comparable<TYPE> _max
Constructor Detail

LessThanAttrEventTrigger

public LessThanAttrEventTrigger(String objectName,
                                String attributeName,
                                TYPE max)
                         throws MalformedObjectNameException,
                                IllegalArgumentException
Construct event trigger and specify the MXBean attribute that will be polled by this event trigger as well as max value of the attribute.

Parameters:
objectName - object name of an MBean to be polled
attributeName - name of an MBean attribute to be polled
max - maximum value of the attribute
Throws:
MalformedObjectNameException
IllegalArgumentException
Method Detail

match

public boolean match(Comparable<TYPE> value)
Compare the value of the MXBean attribute being polling to check if it is less than the min value.

Overrides:
match in class AttrEventTrigger<TYPE extends Comparable<TYPE>>
See Also:
AttrEventTrigger.match(java.lang.Comparable)

toString

public String toString()
Returns the string representation of this event trigger in the format "name
Overrides:
toString in class AttrEventTrigger<TYPE extends Comparable<TYPE>>
Returns:
string representation of the event trigger
See Also:
Object.toString()


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.