blob: 9f095cffd8ca648129e7a0eba8237e30d3f90821 [file] [log] [blame]
alshabib2a441c62015-04-13 18:39:38 -07001/*
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.flowobjective;
17
18import org.onosproject.event.AbstractEvent;
19
20/**
21 * Describes a objective event.
22 */
23public class ObjectiveEvent extends AbstractEvent<ObjectiveEvent.Type, Integer> {
24
25 /**
26 * Type of objective events.
27 */
28 public enum Type {
29 /**
30 * Signifies that the objective has been added to the store.
31 */
32 ADD,
33
34 /**
35 * Signifies that the objective has been removed.
36 */
37 REMOVE
38 }
39
40 /**
41 * Creates an event of the given type for the specified objective id.
42 *
43 * @param type the type of the event
44 * @param objective the objective id the event is about
45 */
46 public ObjectiveEvent(Type type, Integer objective) {
47 super(type, objective);
48 }
49
50 /**
51 * Creates an event of the given type for the specified objective id at the given
52 * time.
53 *
54 * @param type the type of the event
55 * @param objective the objective id the event is about
56 * @param time the time of the event
57 */
58 public ObjectiveEvent(Type type, Integer objective, long time) {
59 super(type, objective, time);
60 }
61}
62