Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.watch
Class ThresholdManager

    java.lang.Object
      org.jini.rio.watch.ThresholdManager

Direct Known Subclasses:
  BoundedThresholdManager

    public abstract class ThresholdManager

extends Object

The ThresholdManager is the keeper of ThresholdValues and determines when Calculable items being recorded have crossed any thresholds. A ThresholdManager provides threshold management processing, providing specific behavior that may be used to remedy the situation where a threshold has been crossed

Field Summary
`protected List<ThresholdListener>` | `thresholdListeners`
`protected ThresholdValues` | `thresholdValues` Holds value of property thresholdValues

Constructor Summary
`ThresholdManager()`

Method Summary
`void` | `addThresholdListener(ThresholdListener listener)` Add a Threshold listener
`abstract void` | `checkThreshold(Calculable calculable)` Check the threshold and determine if any action needs to occur
`abstract boolean` | `getThresholdCrossed()` Get the value of the thresholdCrossed property
`ThresholdListener[]` | `getThresholdListeners()` Get all registered ThresholdListener instances
`ThresholdValues` | `getThresholdValues()` Getter for property thresholdValues.
`protected void` | `notifyListeners(Calculable calculable, int type)` Notify all ThresholdListeners of a threshold being crossed
`void` | `removeThresholdListener(ThresholdListener listener)` Remove a ThresholdListener
`void` | `setThresholdValues(ThresholdValues thresholdValues)` Setter for property thresholdValues.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### thresholdListeners

    protected final transient List<ThresholdListener> thresholdListeners

### thresholdValues

    protected ThresholdValues thresholdValues

  Holds value of property thresholdValues

Constructor Detail

### ThresholdManager

    public ThresholdManager()

Method Detail

### checkThreshold

    public abstract void checkThreshold(Calculable calculable)

  Check the threshold and determine if any action needs to occur

  Parameters:
    `calculable` - The Calculable to check

### getThresholdCrossed

    public abstract boolean getThresholdCrossed()

  Get the value of the thresholdCrossed property

  Returns:
    The value of the thresholdCrossed property, true if a threshold has been crossed, false otherwise

### getThresholdValues

    public ThresholdValues getThresholdValues()

  Getter for property thresholdValues.

  Returns:
    Value of property thresholdValues.

### setThresholdValues

    public void setThresholdValues(ThresholdValues thresholdValues)

  Setter for property thresholdValues.

  Parameters:
    `thresholdValues` - New value of property thresholdValues.

### notifyListeners

    protected void notifyListeners(Calculable calculable,
                                   int type)

  Notify all ThresholdListeners of a threshold being crossed

  Parameters:
    `calculable` - The Calculable record
    `type` - The type of threshold, breached or cleared

### addThresholdListener

    public void addThresholdListener(ThresholdListener listener)

  Add a Threshold listener

  Parameters:
    `listener` - the thresholdlistener to add

### removeThresholdListener

    public void removeThresholdListener(ThresholdListener listener)

  Remove a ThresholdListener

  Parameters:
    `listener` - the thresholdlistener to remove

### getThresholdListeners

    public ThresholdListener[] getThresholdListeners()

  Get all registered ThresholdListener instances

  Returns:
    Array of ThresholdListener[]. A new array will be allocated each time this method is called. If there are no registered ThresholdListener instances, a zero-length array will be returned

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.