blob: b6754b12246f2b9aa8b2d48695168d8da8332bbb [file] [log] [blame]
jiangruie3d60b12015-11-25 16:27:04 +08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
jiangruie3d60b12015-11-25 16:27:04 +08003 *
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.vtnrsc.routerinterface;
17
18import org.onosproject.event.AbstractEvent;
19import org.onosproject.vtnrsc.RouterInterface;
20
21/**
22 * Describes network Router Interface event.
23 */
24public class RouterInterfaceEvent
25 extends AbstractEvent<RouterInterfaceEvent.Type, RouterInterface> {
26
27 /**
28 * Type of Router Interface events.
29 */
30 public enum Type {
31 /**
32 * Signifies that router interface has been added.
33 */
34 ROUTER_INTERFACE_PUT,
35 /**
36 * Signifies that router interface has been removed.
37 */
38 ROUTER_INTERFACE_DELETE
39 }
40
41 /**
42 * Creates an event of a given type and for the specified Router Interface.
43 *
44 * @param type Router Interface event type
45 * @param routerInterface Router Interface subject
46 */
47 public RouterInterfaceEvent(Type type, RouterInterface routerInterface) {
48 super(type, routerInterface);
49 }
50
51 /**
52 * Creates an event of a given type and for the specified Router Interface.
53 *
54 * @param type Router Interface event type.
55 * @param routerInterface Router Interface subject
56 * @param time occurrence time
57 */
58 public RouterInterfaceEvent(Type type, RouterInterface routerInterface,
59 long time) {
60 super(type, routerInterface, time);
61 }
62}