org.eclipse.jetty.monitor.triggers
Class RangeInclAttrEventTrigger<TYPE extends java.lang.Comparable<TYPE>>
java.lang.Object
org.eclipse.jetty.monitor.jmx.EventTrigger
org.eclipse.jetty.monitor.triggers.AttrEventTrigger<TYPE>
org.eclipse.jetty.monitor.triggers.RangeInclAttrEventTrigger<TYPE>
public class RangeInclAttrEventTrigger<TYPE extends java.lang.Comparable<TYPE>>
- extends AttrEventTrigger<TYPE>
RangeInclAttrEventTrigger
Event trigger that polls a value of an MXBean attribute and
checks if it is in a range from specified min value to
specified max value including the range bounds.
Constructor Summary |
RangeInclAttrEventTrigger(java.lang.String objectName,
java.lang.String attributeName,
TYPE min,
TYPE max)
Construct event trigger and specify the MXBean attribute
that will be polled by this event trigger as well as min
and max value of the attribute. |
Method Summary |
boolean |
match(java.lang.Comparable<TYPE> value)
Compare the value of the MXBean attribute being polling
to check if it is in a range from specified min value to
specified max value including the range bounds. |
java.lang.String |
toString()
Returns the string representation of this event trigger
in the format "min<=name<=max". |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_min
protected final TYPE extends java.lang.Comparable<TYPE> _min
_max
protected final TYPE extends java.lang.Comparable<TYPE> _max
RangeInclAttrEventTrigger
public RangeInclAttrEventTrigger(java.lang.String objectName,
java.lang.String attributeName,
TYPE min,
TYPE max)
throws javax.management.MalformedObjectNameException,
java.lang.IllegalArgumentException
- Construct event trigger and specify the MXBean attribute
that will be polled by this event trigger as well as min
and max value of the attribute.
- Parameters:
objectName
- object name of an MBean to be polledattributeName
- name of an MBean attribute to be polledmin
- minimum value of the attributemax
- maximum value of the attribute
- Throws:
javax.management.MalformedObjectNameException
java.lang.IllegalArgumentException
match
public boolean match(java.lang.Comparable<TYPE> value)
- Compare the value of the MXBean attribute being polling
to check if it is in a range from specified min value to
specified max value including the range bounds.
- Overrides:
match
in class AttrEventTrigger<TYPE extends java.lang.Comparable<TYPE>>
- See Also:
AttrEventTrigger.match(java.lang.Comparable)
toString
public java.lang.String toString()
- Returns the string representation of this event trigger
in the format "min<=name<=max".
- Overrides:
toString
in class AttrEventTrigger<TYPE extends java.lang.Comparable<TYPE>>
- Returns:
- string representation of the event trigger
- See Also:
Object.toString()
Copyright © 2012. All Rights Reserved.