blob: d9d8a97a357098420e62819fb2ea5988c9e44d85 [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/**
Srikanth Vavilapalli0599d512015-01-30 12:57:56 -080021 * Describes group events.
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -080022 */
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 /*
Srikanth Vavilapalli0599d512015-01-30 12:57:56 -080051 * Signifies that a request to update Group has been added to the store.
52 */
53 GROUP_UPDATE_REQUESTED,
54 /*
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -080055 * Signifies that a request to delete Group has been added to the store.
56 */
57 GROUP_REMOVE_REQUESTED,
58 }
59
60 /**
61 * Creates an event of a given type and for the specified Group and the
62 * current time.
63 *
64 * @param type Group event type
65 * @param group event subject
66 */
67 public GroupEvent(Type type, Group group) {
68 super(type, group);
69 }
70
71 /**
72 * Creates an event of a given type and for the specified Group and time.
73 *
74 * @param type Group event type
75 * @param group event subject
76 * @param time occurrence time
77 */
78 public GroupEvent(Type type, Group group, long time) {
79 super(type, group, time);
80 }
81
82}