twaver.alarm
Class AlarmStatePropagator

java.lang.Object
  extended by twaver.alarm.PropertyPropagator<Element>
      extended by twaver.alarm.AlarmStatePropagator

public class AlarmStatePropagator
extends PropertyPropagator<Element>

告警状态传播器,用于告警传递逻辑的控制,twaver中子节点上的告警可以向上传播,被称为传播告警


Field Summary
 
Fields inherited from class twaver.alarm.PropertyPropagator
isPropagating
 
Constructor Summary
AlarmStatePropagator(ElementBox dataBox)
          Creator.
 
Method Summary
protected  void onDataPropertyChangeEvent(PropertyChangeEvent e)
          元素属性变化事件,回调此函数
protected  void propagateToParent(Data child, Data parent)
          Called when need to propagate property change to specified data's parent.
protected  void propagateToTop(Data data)
          Propagate property change to the specified data's next level data.
 
Methods inherited from class twaver.alarm.PropertyPropagator
getDataBox, getPropertyName, getPropertyType, isEnable, propagate, setEnable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlarmStatePropagator

public AlarmStatePropagator(ElementBox dataBox)
Creator. Create propagator and connect to the specified element box.

Parameters:
dataBox - - the element box this propagator will work for.
Method Detail

onDataPropertyChangeEvent

protected void onDataPropertyChangeEvent(PropertyChangeEvent e)
Description copied from class: PropertyPropagator
元素属性变化事件,回调此函数

Overrides:
onDataPropertyChangeEvent in class PropertyPropagator<Element>

propagateToTop

protected void propagateToTop(Data data)
Description copied from class: PropertyPropagator
Propagate property change to the specified data's next level data. In this default implementation, the "next level data" means the parent data. You can overwrite this method to do your customized property propagation.

Overrides:
propagateToTop in class PropertyPropagator<Element>
Parameters:
data - the data need to propagate.

propagateToParent

protected void propagateToParent(Data child,
                                 Data parent)
Description copied from class: PropertyPropagator
Called when need to propagate property change to specified data's parent.

Overrides:
propagateToParent in class PropertyPropagator<Element>
Parameters:
child - child data, the change source.
parent - parent data, the propagation target.