blob: 566c2b480d161ba6a0974b8f9f86e09ca531db6e [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 */
22 RULE_REMOVED,
23 }
24
25 /**
26 * Creates an event of a given type and for the specified flow rule and the
27 * current time.
28 *
29 * @param type flow rule event type
30 * @param flowRule event flow rule subject
31 */
32 public FlowRuleEvent(Type type, FlowRule flowRule) {
33 super(type, flowRule);
34 }
35
36 /**
37 * Creates an event of a given type and for the specified flow rule and time.
38 *
39 * @param type flow rule event type
40 * @param flowRule event flow rule subject
41 * @param time occurrence time
42 */
43 public FlowRuleEvent(Type type, FlowRule flowRule, long time) {
44 super(type, flowRule, time);
45 }
46
47}