blob: ed96b980fcfec0008f7b783b8b6c470cc33a5c6a [file] [log] [blame]
Jonathan Hart7d7e2f52016-03-29 16:22:49 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Jonathan Hart7d7e2f52016-03-29 16:22:49 -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 */
16
17package org.onosproject.incubator.net.routing;
18
19import org.onosproject.event.AbstractEvent;
20
21/**
22 * Describes an event about a route.
23 */
24public class RouteEvent extends AbstractEvent<RouteEvent.Type, ResolvedRoute> {
25
26 /**
27 * Route event type.
28 */
29 public enum Type {
30
31 /**
32 * Route is new.
33 */
34 ROUTE_ADDED,
35
36 /**
37 * Route has updated information.
38 */
39 ROUTE_UPDATED,
40
41 /**
42 * Route was removed.
43 */
44 ROUTE_REMOVED
45 }
46
47 /**
48 * Creates a new route event.
49 *
50 * @param type event type
51 * @param subject event subject
52 */
53 public RouteEvent(Type type, ResolvedRoute subject) {
54 super(type, subject);
55 }
56
57 /**
58 * Creates a new route event.
59 *
60 * @param type event type
61 * @param subject event subject
62 * @param time event time
63 */
64 protected RouteEvent(Type type, ResolvedRoute subject, long time) {
65 super(type, subject, time);
66 }
67
68}