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 ThresholdEventHandler

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

All Implemented Interfaces:
  ThresholdListener

    public class ThresholdEventHandler

extends Object
implements ThresholdListener

Handles a threshold notify by producing a ThresholdEvent. The EventHandler and event must be set in order for the remote event to be fired.

Field Summary
`static EventDescriptor` | `eventDescriptor` The default event descriptor for the Threshold event
`protected EventHandler` | `eventHandler` Holds value of property eventHandler.

Constructor Summary
`ThresholdEventHandler()` Create a new ThresholdEventHandler
`ThresholdEventHandler(ThresholdEvent event, EventHandler eventHandler)` Creates new ThresholdEventHandler using the specified ThresholdEvent, and the specified EventHandler
`ThresholdEventHandler(WatchDataSource source)` Create a new ThresholdEventHandler using the default ThresholdEvent
`ThresholdEventHandler(WatchDataSource source, EventHandler eventHandler)` Creates new ThresholdEventHandler using the default ThresholdEvent, and the specified EventHandler

Method Summary
`ThresholdEvent` | `getEvent()` Gets the current ThresholdEvent
`static EventDescriptor` | `getEventDescriptor()` Dets the default event descriptor for a ThresholdEvent
`EventHandler` | `getEventHandler()` Getter for property eventHandler.
`String` | `getID()` Get the ID of the ThresholdWatch the ThresholdListener is associated to
`void` | `notify(Calculable calculable, ThresholdValues thresholdValues, int type)` Notify for a ThresholdEvent
`void` | `setEvent(ThresholdEvent event)` Sets the current ThresholdEvent
`void` | `setEventHandler(EventHandler eventHandler)` Setter for property eventHandler.
`void` | `setThresholdManager(ThresholdManager thresholdManager)` Set the ThresholdManager and connect to the ThresholdManager

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

Field Detail

### eventHandler

    protected EventHandler eventHandler

  Holds value of property eventHandler.

### eventDescriptor

    public static final EventDescriptor eventDescriptor

  The default event descriptor for the Threshold event

Constructor Detail

### ThresholdEventHandler

    public ThresholdEventHandler()

  Create a new ThresholdEventHandler

### ThresholdEventHandler

    public ThresholdEventHandler(WatchDataSource source)

  Create a new ThresholdEventHandler using the default ThresholdEvent

  Parameters:
    `source` - The WatchDataSource for the default event.

### ThresholdEventHandler

    public ThresholdEventHandler(WatchDataSource source,
                                 EventHandler eventHandler)

  Creates new ThresholdEventHandler using the default ThresholdEvent, and the specified EventHandler

  Parameters:
    `source` - The WatchDataSource for the default event.
    `eventHandler` - the Event Handler for firing the event

### ThresholdEventHandler

    public ThresholdEventHandler(ThresholdEvent event,
                                 EventHandler eventHandler)

  Creates new ThresholdEventHandler using the specified ThresholdEvent, and the specified EventHandler

  Parameters:
    `event` - The ThresholdEvent, or a subclass thereof, to be used.
    `eventHandler` - The Event Handler for firing the event

Method Detail

### getID

    public String getID()

  Description copied from interface: `ThresholdListener`
  Get the ID of the ThresholdWatch the ThresholdListener is associated to

  Specified by:
    `getID` in interface `ThresholdListener`
  Returns:
    The identifier (ID) of the ThresholdWatch the ThresholdListener is asscociated to
  See Also:
    `ThresholdListener.getID()`

### setThresholdManager

    public void setThresholdManager(ThresholdManager thresholdManager)

  Description copied from interface: `ThresholdListener`
  Set the ThresholdManager and connect to the ThresholdManager

  Specified by:
    `setThresholdManager` in interface `ThresholdListener`
  Parameters:
    `thresholdManager` - The ThresholdManager to connect to
  See Also:
    `ThresholdListener.setThresholdManager(org.jini.rio.watch.ThresholdManager)`

### notify

    public void notify(Calculable calculable,
                       ThresholdValues thresholdValues,
                       int type)

  Notify for a ThresholdEvent

  Specified by:
    `notify` in interface `ThresholdListener`
  Parameters:
    `calculable` - The current metric
    `thresholdValues` - The current thresholds
    `type` - The type of threshold event, breached or cleared

### getEventHandler

    public EventHandler getEventHandler()

  Getter for property eventHandler.

  Returns:
    Value of property eventHandler.

### setEventHandler

    public void setEventHandler(EventHandler eventHandler)

  Setter for property eventHandler.

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

### getEvent

    public ThresholdEvent getEvent()

  Gets the current ThresholdEvent

  Returns:
    the current ThresholdEvent

### setEvent

    public void setEvent(ThresholdEvent event)

  Sets the current ThresholdEvent

  Parameters:
    `event` - the current ThresholdEvent

### getEventDescriptor

    public static EventDescriptor getEventDescriptor()

  Dets the default event descriptor for a ThresholdEvent

  Returns:
    the default event descriptor for a ThresholdEvent

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.