blob: b4b228c619fbaf50899e832c305515c87b0c011d [file] [log] [blame]
alshabiba9b2b5d2015-09-23 15:01:47 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
alshabiba9b2b5d2015-09-23 15:01:47 -07003 *
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 */
alshabib2ce0c732015-10-02 11:20:39 +020016package org.onosproject.net.mcast;
alshabiba9b2b5d2015-09-23 15:01:47 -070017
alshabib2ce0c732015-10-02 11:20:39 +020018import com.google.common.annotations.Beta;
alshabibbf85a102015-12-04 15:45:43 -080019import org.onosproject.event.ListenerService;
alshabiba9b2b5d2015-09-23 15:01:47 -070020import org.onosproject.net.ConnectPoint;
21
alshabib79e52872015-12-07 16:01:01 -080022import java.util.Set;
alshabiba9b2b5d2015-09-23 15:01:47 -070023
24/**
25 * A service interface for maintaining multicast information.
26 */
alshabib2ce0c732015-10-02 11:20:39 +020027@Beta
alshabibbf85a102015-12-04 15:45:43 -080028public interface MulticastRouteService
29 extends ListenerService<McastEvent, McastListener> {
alshabiba9b2b5d2015-09-23 15:01:47 -070030
31 /**
32 * Adds a route to the information base.
33 *
34 * @param route a multicast route
35 */
36 void add(McastRoute route);
37
38 /**
39 * Removes a route from the information base.
40 *
41 * @param route a multicast route
42 */
43 void remove(McastRoute route);
44
45 /**
Jonathan Hart07eb0412016-02-08 16:42:29 -080046 * Gets all multicast routes in the system.
47 *
48 * @return set of multicast routes
49 */
50 Set<McastRoute> getRoutes();
51
52 /**
alshabiba9b2b5d2015-09-23 15:01:47 -070053 * Adds a source connection to the route from where the
54 * data stream is originating.
55 *
56 * @param route the multicast route
57 * @param connectPoint a source connect point
58 */
59 void addSource(McastRoute route, ConnectPoint connectPoint);
60
61 /**
62 * Adds a sink to the route to which a data stream should be
63 * sent to.
64 *
65 * @param route a multicast route
66 * @param connectPoint a sink connect point
67 */
68 void addSink(McastRoute route, ConnectPoint connectPoint);
69
70 /**
alshabiba9b2b5d2015-09-23 15:01:47 -070071 * Removes a sink from the route.
72 *
73 * @param route the multicast route
74 * @param connectPoint a sink connect point
75 */
76 void removeSink(McastRoute route, ConnectPoint connectPoint);
77
78 /**
79 * Find the data source association for this multicast route.
80 *
81 * @param route a multicast route
82 * @return a connect point
83 */
84 ConnectPoint fetchSource(McastRoute route);
85
86 /**
87 * Find the list of sinks for this route.
88 *
89 * @param route a multicast route
90 * @return a list of connect points
91 */
alshabib79e52872015-12-07 16:01:01 -080092 Set<ConnectPoint> fetchSinks(McastRoute route);
alshabiba9b2b5d2015-09-23 15:01:47 -070093}