blob: 225371751f079605d04ad2dc53d042b1d1b22e82 [file] [log] [blame]
Kiran Ramachandrac92a1222016-03-30 13:05:31 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Kiran Ramachandrac92a1222016-03-30 13:05:31 +05303 *
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 */
16package org.onosproject.isis.controller;
17
tejeshwer degala3fe1ed52016-04-22 17:04:01 +053018import com.fasterxml.jackson.databind.JsonNode;
sunish vk7bdf4d42016-06-24 12:29:43 +053019import org.onosproject.isis.controller.topology.IsisLinkListener;
mohamed rahil8ea09d42016-04-19 20:47:21 +053020import org.onosproject.isis.controller.topology.IsisRouterListener;
21
Kiran Ramachandrac92a1222016-03-30 13:05:31 +053022import java.util.List;
sunish vk7bdf4d42016-06-24 12:29:43 +053023import java.util.Set;
Kiran Ramachandrac92a1222016-03-30 13:05:31 +053024
25/**
26 * Representation of an ISIS controller.
27 */
28public interface IsisController {
29
30 /**
31 * Registers a listener for router meta events.
32 *
mohamed rahil8ea09d42016-04-19 20:47:21 +053033 * @param isisRouterListener ISIS router listener instance
Kiran Ramachandrac92a1222016-03-30 13:05:31 +053034 */
35 void addRouterListener(IsisRouterListener isisRouterListener);
36
37 /**
38 * Unregisters a router listener.
39 *
mohamed rahil8ea09d42016-04-19 20:47:21 +053040 * @param isisRouterListener ISIS router listener instance
Kiran Ramachandrac92a1222016-03-30 13:05:31 +053041 */
42 void removeRouterListener(IsisRouterListener isisRouterListener);
43
44 /**
45 * Updates configuration of processes.
46 *
tejeshwer degala3fe1ed52016-04-22 17:04:01 +053047 * @param processesNode json node represents process
Kiran Ramachandrac92a1222016-03-30 13:05:31 +053048 */
tejeshwer degala3fe1ed52016-04-22 17:04:01 +053049 void updateConfig(JsonNode processesNode);
Kiran Ramachandrac92a1222016-03-30 13:05:31 +053050
51 /**
52 * Gets the all configured processes.
53 *
54 * @return list of process instances
55 */
56 List<IsisProcess> allConfiguredProcesses();
sunish vk7bdf4d42016-06-24 12:29:43 +053057
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 Ramachandrac92a1222016-03-30 13:05:31 +053085}