blob: 16c5ec3bb0d87b6465e5954743435ed7bf5a5da8 [file] [log] [blame]
wei wei89ddc322015-03-22 16:29:04 -05001/*
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 */
Thomas Vachuskabf916ea2015-05-20 18:24:34 -070016
17package org.onosproject.incubator.net.tunnel;
wei wei89ddc322015-03-22 16:29:04 -050018
19import org.onosproject.event.AbstractEvent;
20
21/**
22 * Describes tunnel events.
23 */
jcc4a20a5f2015-04-30 15:43:39 +080024public final class TunnelEvent extends AbstractEvent<TunnelEvent.Type, Tunnel> {
wei wei89ddc322015-03-22 16:29:04 -050025
26 /**
27 * Type of tunnel events.
28 */
29 public enum Type {
30 /**
31 * Signifies that a new tunnel has been added.
32 */
33 TUNNEL_ADDED,
34
35 /**
36 * Signifies that a tunnel has been updated or changed state.
37 */
38 TUNNEL_UPDATED,
39
40 /**
41 * Signifies that a tunnel has been removed.
42 */
43 TUNNEL_REMOVED
44 }
45
46 /**
47 * Creates an event of a given type and for the specified tunnel.
48 *
49 * @param type tunnel event type
50 * @param tunnel event tunnel subject
51 */
52 public TunnelEvent(Type type, Tunnel tunnel) {
53 super(type, tunnel);
54 }
55
56 /**
57 * Creates an event of a given type and for the specified link and
58 * the current time.
59 *
60 * @param type tunnel event type
61 * @param tunnel event tunnel subject
62 * @param time occurrence time
63 */
64 public TunnelEvent(Type type, Tunnel tunnel, long time) {
65 super(type, tunnel, time);
66 }
67
68}