blob: bbb9d77f82ca22e2dfee736a1af93b70f6f86179 [file] [log] [blame]
alshabib2a441c62015-04-13 18:39:38 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
alshabib2a441c62015-04-13 18:39:38 -07003 *
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
Thomas Vachuskaa9d491e2015-05-20 11:17:21 -070018import com.google.common.annotations.Beta;
alshabib2a441c62015-04-13 18:39:38 -070019import org.onosproject.event.AbstractEvent;
20
21/**
22 * Describes a objective event.
23 */
Thomas Vachuskaa9d491e2015-05-20 11:17:21 -070024@Beta
alshabib2a441c62015-04-13 18:39:38 -070025public class ObjectiveEvent extends AbstractEvent<ObjectiveEvent.Type, Integer> {
26
27 /**
28 * Type of objective events.
29 */
30 public enum Type {
31 /**
32 * Signifies that the objective has been added to the store.
33 */
34 ADD,
35
36 /**
37 * Signifies that the objective has been removed.
38 */
39 REMOVE
40 }
41
42 /**
43 * Creates an event of the given type for the specified objective id.
44 *
45 * @param type the type of the event
46 * @param objective the objective id the event is about
47 */
48 public ObjectiveEvent(Type type, Integer objective) {
49 super(type, objective);
50 }
51
52 /**
53 * Creates an event of the given type for the specified objective id at the given
54 * time.
55 *
56 * @param type the type of the event
57 * @param objective the objective id the event is about
58 * @param time the time of the event
59 */
60 public ObjectiveEvent(Type type, Integer objective, long time) {
61 super(type, objective, time);
62 }
63}
64