blob: a5e8d30953cbbf7bb43a8cdc9fac475bb03cc0e8 [file] [log] [blame]
alshabiba9b2b5d2015-09-23 15:01:47 -07001/*
2 * Copyright 2015 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 */
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;
alshabiba9b2b5d2015-09-23 15:01:47 -070019import org.onosproject.net.ConnectPoint;
20
21import java.util.List;
22
23/**
24 * A service interface for maintaining multicast information.
25 */
alshabib2ce0c732015-10-02 11:20:39 +020026@Beta
alshabiba9b2b5d2015-09-23 15:01:47 -070027public interface MulticastRouteTable {
28
29 /**
30 * Adds a route to the information base.
31 *
32 * @param route a multicast route
33 */
34 void add(McastRoute route);
35
36 /**
37 * Removes a route from the information base.
38 *
39 * @param route a multicast route
40 */
41 void remove(McastRoute route);
42
43 /**
44 * Adds a source connection to the route from where the
45 * data stream is originating.
46 *
47 * @param route the multicast route
48 * @param connectPoint a source connect point
49 */
50 void addSource(McastRoute route, ConnectPoint connectPoint);
51
52 /**
53 * Adds a sink to the route to which a data stream should be
54 * sent to.
55 *
56 * @param route a multicast route
57 * @param connectPoint a sink connect point
58 */
59 void addSink(McastRoute route, ConnectPoint connectPoint);
60
61 /**
62 * Removes a source connection from the route.
63 *
64 * @param route the multicast route
65 * @param connectPoint a source connect point
66 */
67 void removeSource(McastRoute route, ConnectPoint connectPoint);
68
69 /**
70 * Removes a sink from the route.
71 *
72 * @param route the multicast route
73 * @param connectPoint a sink connect point
74 */
75 void removeSink(McastRoute route, ConnectPoint connectPoint);
76
77 /**
78 * Find the data source association for this multicast route.
79 *
80 * @param route a multicast route
81 * @return a connect point
82 */
83 ConnectPoint fetchSource(McastRoute route);
84
85 /**
86 * Find the list of sinks for this route.
87 *
88 * @param route a multicast route
89 * @return a list of connect points
90 */
91 List<ConnectPoint> fetchSinks(McastRoute route);
92}