Aihua Guo | 1ce2dd1 | 2016-08-12 23:37:44 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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 | */ |
| 16 | package org.onosproject.tetopology.management.api; |
| 17 | |
| 18 | import org.onosproject.event.AbstractEvent; |
| 19 | |
| 20 | /** |
| 21 | * TE network topology event. |
| 22 | */ |
| 23 | public class TeTopologyEvent |
| 24 | extends AbstractEvent<TeTopologyEvent.Type, TeTopologyEventSubject> { |
| 25 | |
| 26 | /** |
| 27 | * Type of TE topology events. |
| 28 | */ |
| 29 | public enum Type { |
| 30 | |
| 31 | /** Designates addition of a network. */ |
| 32 | NETWORK_ADDED, |
| 33 | |
| 34 | /** Designates update of a network. */ |
| 35 | NETWORK_UPDATED, |
| 36 | |
| 37 | /** Designates removal of a network. */ |
| 38 | NETWORK_REMOVED, |
| 39 | |
| 40 | /** Designates addition of a node. */ |
| 41 | NODE_ADDED, |
| 42 | |
| 43 | /** Designates update of a node. */ |
| 44 | NODE_UPDATED, |
| 45 | |
| 46 | /** Designates removal of a node. */ |
| 47 | NODE_REMOVED, |
| 48 | |
| 49 | /** Designates addition of a termination point. */ |
| 50 | TP_ADDED, |
| 51 | |
| 52 | /** Designates update of a termination point. */ |
| 53 | TP_UPDATED, |
| 54 | |
| 55 | /** Designates removal of a termination point. */ |
| 56 | TP_REMOVED, |
| 57 | |
| 58 | /** Designates addition of a link. */ |
| 59 | LINK_ADDED, |
| 60 | |
| 61 | /** Designates update of a link. */ |
| 62 | LINK_UPDATED, |
| 63 | |
| 64 | /** Designates removal of a link. */ |
| 65 | LINK_REMOVED; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Constructor for TeTopologyEvent. |
| 70 | * |
| 71 | * @param type type of topology event |
| 72 | * @param subject event subject interface |
| 73 | */ |
| 74 | public TeTopologyEvent(Type type, TeTopologyEventSubject subject) { |
| 75 | super(type, subject); |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * Constructor for TeTopologyEvent. |
| 80 | * |
| 81 | * @param type type of topology event |
| 82 | * @param subject event subject interface |
| 83 | * @param time event time |
| 84 | */ |
| 85 | public TeTopologyEvent(Type type, TeTopologyEventSubject subject, long time) { |
| 86 | super(type, subject, time); |
| 87 | } |
| 88 | |
| 89 | } |