alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [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 | */ |
alshabib | 2ce0c73 | 2015-10-02 11:20:39 +0200 | [diff] [blame] | 16 | package org.onosproject.net.mcast; |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 17 | |
alshabib | bf85a10 | 2015-12-04 15:45:43 -0800 | [diff] [blame] | 18 | import org.onosproject.event.ListenerService; |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 19 | import org.onosproject.net.ConnectPoint; |
| 20 | |
alshabib | 79e5287 | 2015-12-07 16:01:01 -0800 | [diff] [blame] | 21 | import java.util.Set; |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * A service interface for maintaining multicast information. |
Ray Milkey | 50b1458 | 2017-08-23 09:55:02 -0700 | [diff] [blame] | 25 | * |
| 26 | * @deprecated in 1.11 ("Loon") release. To be moved into an app. |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 27 | */ |
Ray Milkey | 50b1458 | 2017-08-23 09:55:02 -0700 | [diff] [blame] | 28 | @Deprecated |
alshabib | bf85a10 | 2015-12-04 15:45:43 -0800 | [diff] [blame] | 29 | public interface MulticastRouteService |
| 30 | extends ListenerService<McastEvent, McastListener> { |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 31 | |
| 32 | /** |
| 33 | * Adds a route to the information base. |
| 34 | * |
| 35 | * @param route a multicast route |
| 36 | */ |
| 37 | void add(McastRoute route); |
| 38 | |
| 39 | /** |
| 40 | * Removes a route from the information base. |
| 41 | * |
| 42 | * @param route a multicast route |
| 43 | */ |
| 44 | void remove(McastRoute route); |
| 45 | |
| 46 | /** |
Jonathan Hart | 07eb041 | 2016-02-08 16:42:29 -0800 | [diff] [blame] | 47 | * Gets all multicast routes in the system. |
| 48 | * |
| 49 | * @return set of multicast routes |
| 50 | */ |
| 51 | Set<McastRoute> getRoutes(); |
| 52 | |
| 53 | /** |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 54 | * Adds a source connection to the route from where the |
| 55 | * data stream is originating. |
| 56 | * |
| 57 | * @param route the multicast route |
| 58 | * @param connectPoint a source connect point |
| 59 | */ |
| 60 | void addSource(McastRoute route, ConnectPoint connectPoint); |
| 61 | |
| 62 | /** |
| 63 | * Adds a sink to the route to which a data stream should be |
| 64 | * sent to. |
| 65 | * |
| 66 | * @param route a multicast route |
| 67 | * @param connectPoint a sink connect point |
| 68 | */ |
| 69 | void addSink(McastRoute route, ConnectPoint connectPoint); |
| 70 | |
| 71 | /** |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 72 | * Removes a sink from the route. |
| 73 | * |
| 74 | * @param route the multicast route |
| 75 | * @param connectPoint a sink connect point |
| 76 | */ |
| 77 | void removeSink(McastRoute route, ConnectPoint connectPoint); |
| 78 | |
| 79 | /** |
| 80 | * Find the data source association for this multicast route. |
| 81 | * |
| 82 | * @param route a multicast route |
| 83 | * @return a connect point |
| 84 | */ |
| 85 | ConnectPoint fetchSource(McastRoute route); |
| 86 | |
| 87 | /** |
| 88 | * Find the list of sinks for this route. |
| 89 | * |
| 90 | * @param route a multicast route |
| 91 | * @return a list of connect points |
| 92 | */ |
alshabib | 79e5287 | 2015-12-07 16:01:01 -0800 | [diff] [blame] | 93 | Set<ConnectPoint> fetchSinks(McastRoute route); |
alshabib | a9b2b5d | 2015-09-23 15:01:47 -0700 | [diff] [blame] | 94 | } |