blob: acc28db1c22a5a2db37396fe0eaece317e2fd56e [file] [log] [blame]
Mohammad Shahid4c30ea32017-08-09 18:02:10 +05301/*
2 * Copyright 2017-present Open Networking Foundation
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 */
16
17package org.onosproject.evpnopenflow.rsc.vpnport;
18
19import org.onosproject.event.AbstractEvent;
20import org.onosproject.evpnopenflow.rsc.VpnPort;
21
22/**
23 * Describes network VPN port event.
24 */
25public class VpnPortEvent extends AbstractEvent<VpnPortEvent.Type, VpnPort> {
26
27 /**
28 * Type of VPN port events.
29 */
30 public enum Type {
31 /**
32 * Signifies that VPN port has been set.
33 */
34 VPN_PORT_SET,
35 /**
36 * Signifies that VPN port has been deleted.
37 */
38 VPN_PORT_DELETE,
39 /**
40 * Signifies that VPN port has been updated.
41 */
42 VPN_PORT_UPDATE
43 }
44
45 /**
46 * Creates an event of a given type and for the specified VPN port.
47 *
48 * @param type VPN port type
49 * @param vpnPort VPN port subject
50 */
51 public VpnPortEvent(Type type, VpnPort vpnPort) {
52 super(type, vpnPort);
53 }
54
55 /**
56 * Creates an event of a given type and for the specified VPN port.
57 *
58 * @param type VPN port type
59 * @param vpnPort VPN port subject
60 * @param time occurrence time
61 */
62 public VpnPortEvent(Type type, VpnPort vpnPort, long time) {
63 super(type, vpnPort, time);
64 }
65}