Rio Project 4.2 API Documentation



org.rioproject.watch
Interface ThresholdListener

All Known Implementing Classes:
RedeployPolicyHandler, RelocationPolicyHandler, ScalingPolicyHandler, SLAPolicyHandler

public interface ThresholdListener

Listener for notification that a threshold has been crossed. A ThresholdManager will notify a ThresholdListener if a Threshold has been crossed. The ThresholdListener may take corrective actions to deal with the threshold condition, and/or generate ThresholdEvent notifications to interested EventConsumer instances


Method Summary
 String getID()
          Get the ID of the ThresholdWatch the ThresholdListener is associated to
 void notify(Calculable calculable, ThresholdValues thresholdValues, int type)
          Notify for a threshold event
 void setThresholdManager(ThresholdManager thresholdManager)
          Set the ThresholdManager and connect to the ThresholdManager
 

Method Detail

getID

String getID()
Get the ID of the ThresholdWatch the ThresholdListener is associated to

Returns:
The identifier (ID) of the ThresholdWatch the ThresholdListener is asscociated to

setThresholdManager

void setThresholdManager(ThresholdManager thresholdManager)
Set the ThresholdManager and connect to the ThresholdManager

Parameters:
thresholdManager - The ThresholdManager to connect to

notify

void notify(Calculable calculable,
            ThresholdValues thresholdValues,
            int type)
Notify for a threshold event

Parameters:
calculable - The current metric
thresholdValues - The current thresholds
type - The type of threshold event, breached or cleared

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.