blob: 1cc7b8195d4ac60a5ddefc2eddb39abc687bf36f [file] [log] [blame]
sunish vk11b02ff2016-02-19 19:14:35 +05301/*
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 */
16package org.onosproject.ospf.controller;
17
18import java.util.List;
19import java.util.Set;
20
21/**
22 * Abstraction of an OSPF controller.
23 * Serves as a one stop shop for obtaining OSPF devices and (un)register listeners on OSPF events.
24 */
25public interface OspfController {
26
27 /**
28 * Registers a listener for router meta events.
29 *
30 * @param listener the listener to notify
31 */
32 void addRouterListener(OspfRouterListener listener);
33
34 /**
35 * Unregisters a router listener.
36 *
37 * @param listener the listener to unregister
38 */
39 void removeRouterListener(OspfRouterListener listener);
40
41 /**
42 * Registers a listener for OSPF message events.
43 *
44 * @param listener the listener to notify
45 */
46 void addLinkListener(OspfLinkListener listener);
47
48 /**
49 * Unregisters a link listener.
50 *
51 * @param listener the listener to unregister
52 */
53 void removeLinkListener(OspfLinkListener listener);
54
55 /**
56 * Updates configuration of processes.
57 *
58 * @param processes process info to update
59 */
60 public void updateConfig(List<OspfProcess> processes);
61
62 /**
63 * Deletes configuration parameters.
64 *
65 * @param processes list of process instance
66 * @param attribute attribute to delete
67 */
68 public void deleteConfig(List<OspfProcess> processes, String attribute);
69
70 /**
71 * Gets the list of listeners registered for router events.
72 *
73 * @return list of listeners
74 */
75 Set<OspfRouterListener> listener();
76
77 /**
78 * Gets the list of listeners registered for link events.
79 *
80 * @return list of listeners
81 */
82 public Set<OspfLinkListener> linkListener();
83
84 /**
85 * Gets the configured process.
86 *
87 * @return list of process instances
88 */
89 public List<OspfProcess> getAllConfiguredProcesses();
sunish vk30637eb2016-02-16 15:19:32 +053090}