Thomas Vachuska | 33979fd | 2015-07-31 11:41:14 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Thomas Vachuska | 33979fd | 2015-07-31 11:41:14 -0700 | [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.incubator.net.virtual; |
| 17 | |
| 18 | import org.onosproject.event.AbstractEvent; |
| 19 | |
| 20 | /** |
| 21 | * Describes virtual network event. |
| 22 | */ |
| 23 | public class VirtualNetworkEvent extends AbstractEvent<VirtualNetworkEvent.Type, NetworkId> { |
| 24 | |
| 25 | /** |
| 26 | * Type of virtual network events. |
| 27 | */ |
| 28 | public enum Type { |
| 29 | /** |
| 30 | * Signifies that a new tenant identifier was registered. |
| 31 | */ |
| 32 | TENANT_REGISTERED, |
| 33 | /** |
| 34 | * Signifies that a tenant identifier was unregistered. |
| 35 | */ |
| 36 | TENANT_UNREGISTERED, |
| 37 | /** |
| 38 | * Signifies that a new virtual network was added. |
| 39 | */ |
| 40 | NETWORK_ADDED, |
| 41 | /** |
| 42 | * Signifies that a virtual network was updated. |
| 43 | */ |
| 44 | NETWORK_UPDATED, |
| 45 | /** |
| 46 | * Signifies that a virtual network was removed. |
| 47 | */ |
| 48 | NETWORK_REMOVED |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Creates an event of a given type and for the specified subject and the |
| 53 | * current time. |
| 54 | * |
| 55 | * @param type event type |
| 56 | * @param subject event subject |
| 57 | */ |
| 58 | public VirtualNetworkEvent(Type type, NetworkId subject) { |
| 59 | super(type, subject); |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Creates an event of a given type and for the specified subject and time. |
| 64 | * |
| 65 | * @param type device event type |
| 66 | * @param subject event subject |
| 67 | * @param time occurrence time |
| 68 | */ |
| 69 | public VirtualNetworkEvent(Type type, NetworkId subject, long time) { |
| 70 | super(type, subject, time); |
| 71 | } |
| 72 | } |