Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [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.isis.controller; |
| 17 | |
tejeshwer degala | 3fe1ed5 | 2016-04-22 17:04:01 +0530 | [diff] [blame] | 18 | import com.fasterxml.jackson.databind.JsonNode; |
sunish vk | 7bdf4d4 | 2016-06-24 12:29:43 +0530 | [diff] [blame] | 19 | import org.onosproject.isis.controller.topology.IsisLinkListener; |
mohamed rahil | 8ea09d4 | 2016-04-19 20:47:21 +0530 | [diff] [blame] | 20 | import org.onosproject.isis.controller.topology.IsisRouterListener; |
| 21 | |
Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [diff] [blame] | 22 | import java.util.List; |
sunish vk | 7bdf4d4 | 2016-06-24 12:29:43 +0530 | [diff] [blame] | 23 | import java.util.Set; |
Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * Representation of an ISIS controller. |
| 27 | */ |
| 28 | public interface IsisController { |
| 29 | |
| 30 | /** |
| 31 | * Registers a listener for router meta events. |
| 32 | * |
mohamed rahil | 8ea09d4 | 2016-04-19 20:47:21 +0530 | [diff] [blame] | 33 | * @param isisRouterListener ISIS router listener instance |
Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [diff] [blame] | 34 | */ |
| 35 | void addRouterListener(IsisRouterListener isisRouterListener); |
| 36 | |
| 37 | /** |
| 38 | * Unregisters a router listener. |
| 39 | * |
mohamed rahil | 8ea09d4 | 2016-04-19 20:47:21 +0530 | [diff] [blame] | 40 | * @param isisRouterListener ISIS router listener instance |
Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [diff] [blame] | 41 | */ |
| 42 | void removeRouterListener(IsisRouterListener isisRouterListener); |
| 43 | |
| 44 | /** |
| 45 | * Updates configuration of processes. |
| 46 | * |
tejeshwer degala | 3fe1ed5 | 2016-04-22 17:04:01 +0530 | [diff] [blame] | 47 | * @param processesNode json node represents process |
Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [diff] [blame] | 48 | */ |
tejeshwer degala | 3fe1ed5 | 2016-04-22 17:04:01 +0530 | [diff] [blame] | 49 | void updateConfig(JsonNode processesNode); |
Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [diff] [blame] | 50 | |
| 51 | /** |
| 52 | * Gets the all configured processes. |
| 53 | * |
| 54 | * @return list of process instances |
| 55 | */ |
| 56 | List<IsisProcess> allConfiguredProcesses(); |
sunish vk | 7bdf4d4 | 2016-06-24 12:29:43 +0530 | [diff] [blame] | 57 | |
| 58 | /** |
| 59 | * Registers a listener for ISIS message events. |
| 60 | * |
| 61 | * @param listener the listener to notify |
| 62 | */ |
| 63 | void addLinkListener(IsisLinkListener listener); |
| 64 | |
| 65 | /** |
| 66 | * Unregisters a link listener. |
| 67 | * |
| 68 | * @param listener the listener to unregister |
| 69 | */ |
| 70 | void removeLinkListener(IsisLinkListener listener); |
| 71 | |
| 72 | /** |
| 73 | * Gets the list of listeners registered for router events. |
| 74 | * |
| 75 | * @return list of listeners |
| 76 | */ |
| 77 | Set<IsisRouterListener> listener(); |
| 78 | |
| 79 | /** |
| 80 | * Gets the list of listeners registered for link events. |
| 81 | * |
| 82 | * @return list of listeners |
| 83 | */ |
| 84 | Set<IsisLinkListener> linkListener(); |
Kiran Ramachandra | c92a122 | 2016-03-30 13:05:31 +0530 | [diff] [blame] | 85 | } |