tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow; |
| 2 | |
| 3 | import org.onlab.onos.event.AbstractEvent; |
| 4 | |
| 5 | /** |
| 6 | * Describes flow rule event. |
| 7 | */ |
| 8 | public class FlowRuleEvent extends AbstractEvent<FlowRuleEvent.Type, FlowRule> { |
| 9 | |
| 10 | /** |
| 11 | * Type of flow rule events. |
| 12 | */ |
| 13 | public enum Type { |
| 14 | /** |
| 15 | * Signifies that a new flow rule has been detected. |
| 16 | */ |
| 17 | RULE_ADDED, |
| 18 | |
| 19 | /** |
| 20 | * Signifies that a flow rule has been removed. |
| 21 | */ |
alshabib | 219ebaa | 2014-09-22 15:41:24 -0700 | [diff] [blame] | 22 | RULE_REMOVED, |
| 23 | |
| 24 | /** |
| 25 | * Signifies that a rule has been updated. |
| 26 | */ |
| 27 | RULE_UPDATED |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Creates an event of a given type and for the specified flow rule and the |
| 32 | * current time. |
| 33 | * |
| 34 | * @param type flow rule event type |
| 35 | * @param flowRule event flow rule subject |
| 36 | */ |
| 37 | public FlowRuleEvent(Type type, FlowRule flowRule) { |
| 38 | super(type, flowRule); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Creates an event of a given type and for the specified flow rule and time. |
| 43 | * |
| 44 | * @param type flow rule event type |
| 45 | * @param flowRule event flow rule subject |
| 46 | * @param time occurrence time |
| 47 | */ |
| 48 | public FlowRuleEvent(Type type, FlowRule flowRule, long time) { |
| 49 | super(type, flowRule, time); |
| 50 | } |
| 51 | |
| 52 | } |