blob: b17449df6f7a4b7dc51cb367e470cddbf1843dbd [file] [log] [blame]
tom8bb16062014-09-12 14:47:46 -07001package org.onlab.onos.net.flow;
2
3import org.onlab.onos.event.AbstractEvent;
4
5/**
6 * Describes flow rule event.
7 */
8public 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 */
alshabib219ebaa2014-09-22 15:41:24 -070022 RULE_REMOVED,
23
24 /**
25 * Signifies that a rule has been updated.
26 */
27 RULE_UPDATED
tom8bb16062014-09-12 14:47:46 -070028 }
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}