blob: 97efa5a21f8d7da01f7eee9e1e2eeeb635bf897f [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 */
Yuta HIGUCHIf3d51bd2014-10-21 01:05:33 -070027 RULE_UPDATED,
28
29 // internal event between Manager <-> Store
30
31 /*
32 * Signifies that a request to add flow rule has been added to the store.
33 */
34 RULE_ADD_REQUESTED,
35 /*
36 * Signifies that a request to remove flow rule has been added to the store.
37 */
38 RULE_REMOVE_REQUESTED,
tom8bb16062014-09-12 14:47:46 -070039 }
40
41 /**
42 * Creates an event of a given type and for the specified flow rule and the
43 * current time.
44 *
45 * @param type flow rule event type
46 * @param flowRule event flow rule subject
47 */
48 public FlowRuleEvent(Type type, FlowRule flowRule) {
49 super(type, flowRule);
50 }
51
52 /**
53 * Creates an event of a given type and for the specified flow rule and time.
54 *
55 * @param type flow rule event type
56 * @param flowRule event flow rule subject
57 * @param time occurrence time
58 */
59 public FlowRuleEvent(Type type, FlowRule flowRule, long time) {
60 super(type, flowRule, time);
61 }
62
63}