blob: 1a3641d1fe70c010a3fc50a14e650763039d8837 [file] [log] [blame]
Yuta HIGUCHIda27f522016-07-07 22:05:39 -07001/*
2 * Copyright 2016-present 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 */
Jian Li5e505c62016-12-05 02:44:24 +090016package org.onosproject.lisp.ctl;
Yuta HIGUCHIda27f522016-07-07 22:05:39 -070017
18/**
Jian Li6322a362016-10-31 00:57:19 +090019 * Abstraction of a LISP controller. Serves as a one stop shop for obtaining
20 * LISP devices and (un)register listeners on LISP events.
Yuta HIGUCHIda27f522016-07-07 22:05:39 -070021 */
Jian Li6322a362016-10-31 00:57:19 +090022public interface LispController {
Yuta HIGUCHIda27f522016-07-07 22:05:39 -070023
Jian Li7ccc3a82016-12-09 01:30:56 +090024 /**
25 * Obtains all LISP routers known to this LISP controller.
26 *
27 * @return Iterable of LISP router elements
28 */
29 Iterable<LispRouter> getRouters();
30
31 /**
Jian Li834ff722016-12-13 19:43:02 +090032 * Obtains all subscribed LISP routers known to this LISP controllers.
33 *
34 * @return Iterable of LISP router elements
35 */
36 Iterable<LispRouter> getSubscribedRouters();
37
38 /**
Jian Li7ccc3a82016-12-09 01:30:56 +090039 * Obtains the actual router for the given LispRouterId.
40 *
41 * @param routerId the router to fetch
42 * @return the interface to this router
43 */
44 LispRouter getRouter(LispRouterId routerId);
45
46 /**
47 * Registers a router listener to track router status.
48 * (e.g., router add and removal)
49 *
50 * @param listener the listener to notify
51 */
52 void addRouterListener(LispRouterListener listener);
53
54 /**
55 * Unregisters a router listener.
56 *
57 * @param listener the listener to unregister
58 */
59 void removeRouterListener(LispRouterListener listener);
60
61 /**
62 * Registers a listener for all LISP message types.
63 *
64 * @param listener the listener to notify
65 */
66 void addMessageListener(LispMessageListener listener);
67
68 /**
69 * Unregisters a listener.
70 *
71 * @param listener the listener to unregister
72 */
73 void removeMessageListener(LispMessageListener listener);
Yuta HIGUCHIda27f522016-07-07 22:05:39 -070074}