jiangrui | e3d60b1 | 2015-11-25 16:27:04 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame^] | 2 | * Copyright 2015-present Open Networking Laboratory |
jiangrui | e3d60b1 | 2015-11-25 16:27:04 +0800 | [diff] [blame] | 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 | package org.onosproject.vtnrsc.routerinterface; |
| 17 | |
| 18 | import org.onosproject.event.AbstractEvent; |
| 19 | import org.onosproject.vtnrsc.RouterInterface; |
| 20 | |
| 21 | /** |
| 22 | * Describes network Router Interface event. |
| 23 | */ |
| 24 | public 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 | } |