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.net.provider.ProviderService; |
| 19 | import org.onosproject.tetopology.management.api.link.NetworkLink; |
| 20 | import org.onosproject.tetopology.management.api.link.NetworkLinkKey; |
| 21 | import org.onosproject.tetopology.management.api.node.NetworkNode; |
| 22 | import org.onosproject.tetopology.management.api.node.NetworkNodeKey; |
| 23 | import org.onosproject.tetopology.management.api.node.TerminationPoint; |
| 24 | import org.onosproject.tetopology.management.api.node.TerminationPointKey; |
| 25 | |
| 26 | /** |
| 27 | * APIs for Provider to notify Manager about the network topology updates. |
| 28 | */ |
| 29 | public interface TeTopologyProviderService |
| 30 | extends ProviderService<TeTopologyProvider> { |
| 31 | |
| 32 | /** |
| 33 | * Signals that a Network has been created/updated. |
| 34 | * |
| 35 | * @param network value of the network to be updated |
| 36 | */ |
| 37 | void networkUpdated(Network network); |
| 38 | |
| 39 | /** |
| 40 | * Signals that a Network has been removed. |
| 41 | * |
| 42 | * @param networkId network id in URI format |
| 43 | */ |
| 44 | void networkRemoved(KeyId networkId); |
| 45 | |
| 46 | /** |
| 47 | * Signals that a Link has been created/updated. |
| 48 | * |
| 49 | * @param linkKey link id |
| 50 | * @param link link object to be updated |
| 51 | */ |
| 52 | void linkUpdated(NetworkLinkKey linkKey, NetworkLink link); |
| 53 | |
| 54 | /** |
| 55 | * Signals that a Network has been removed. |
| 56 | * |
| 57 | * @param linkKey link id |
| 58 | */ |
| 59 | void linkRemoved(NetworkLinkKey linkKey); |
| 60 | |
| 61 | /** |
| 62 | * Signals that a Node has been created/updated. |
| 63 | * |
| 64 | * @param nodeKey node id |
| 65 | * @param node node object to be updated |
| 66 | */ |
| 67 | void nodeUpdated(NetworkNodeKey nodeKey, NetworkNode node); |
| 68 | |
| 69 | /** |
| 70 | * Signals that a Node has been removed. |
| 71 | * |
| 72 | * @param nodeKey node id |
| 73 | */ |
| 74 | void nodeRemoved(NetworkNodeKey nodeKey); |
| 75 | |
| 76 | /** |
| 77 | * Signals that a TerminationPoint has been created/updated. |
| 78 | * |
| 79 | * @param terminationPointKey termination point id |
| 80 | * @param terminationPoint termination point object to be updated |
| 81 | */ |
| 82 | void terminationPointUpdated(TerminationPointKey terminationPointKey, |
| 83 | TerminationPoint terminationPoint); |
| 84 | |
| 85 | /** |
| 86 | * Signals that a TerminationPoint has been removed. |
| 87 | * |
| 88 | * @param terminationPointKey termination point id |
| 89 | */ |
| 90 | void terminationPointRemoved(TerminationPointKey terminationPointKey); |
| 91 | |
| 92 | } |