blob: 8bbe742a292f941b9999cc4e1b721c267b731ff0 [file] [log] [blame]
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -08001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.net.group;
17
18import org.onosproject.event.AbstractEvent;
19
20/**
21 * Describes flow rule event.
22 */
23public class GroupEvent extends AbstractEvent<GroupEvent.Type, Group> {
24
25 /**
26 * Type of flow rule events.
27 */
28 public enum Type {
29 /**
30 * Signifies that a new Group has been detected.
31 */
32 GROUP_ADDED,
33
34 /**
35 * Signifies that a Group has been removed.
36 */
37 GROUP_REMOVED,
38
39 /**
40 * Signifies that a Group has been updated.
41 */
42 GROUP_UPDATED,
43
44 // internal event between Manager <-> Store
45
46 /*
47 * Signifies that a request to create Group has been added to the store.
48 */
49 GROUP_ADD_REQUESTED,
50 /*
51 * Signifies that a request to delete Group has been added to the store.
52 */
53 GROUP_REMOVE_REQUESTED,
54 }
55
56 /**
57 * Creates an event of a given type and for the specified Group and the
58 * current time.
59 *
60 * @param type Group event type
61 * @param group event subject
62 */
63 public GroupEvent(Type type, Group group) {
64 super(type, group);
65 }
66
67 /**
68 * Creates an event of a given type and for the specified Group and time.
69 *
70 * @param type Group event type
71 * @param group event subject
72 * @param time occurrence time
73 */
74 public GroupEvent(Type type, Group group, long time) {
75 super(type, group, time);
76 }
77
78}