blob: bf65033abec32fe4334a252c0694388b0637028e [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;
alshabibbf85a102015-12-04 15:45:43 -080019import org.onosproject.event.ListenerService;
alshabiba9b2b5d2015-09-23 15:01:47 -070020import org.onosproject.net.ConnectPoint;
21
22import java.util.List;
23
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 /**
46 * Adds a source connection to the route from where the
47 * data stream is originating.
48 *
49 * @param route the multicast route
50 * @param connectPoint a source connect point
51 */
52 void addSource(McastRoute route, ConnectPoint connectPoint);
53
54 /**
55 * Adds a sink to the route to which a data stream should be
56 * sent to.
57 *
58 * @param route a multicast route
59 * @param connectPoint a sink connect point
60 */
61 void addSink(McastRoute route, ConnectPoint connectPoint);
62
63 /**
alshabiba9b2b5d2015-09-23 15:01:47 -070064 * Removes a sink from the route.
65 *
66 * @param route the multicast route
67 * @param connectPoint a sink connect point
68 */
69 void removeSink(McastRoute route, ConnectPoint connectPoint);
70
71 /**
72 * Find the data source association for this multicast route.
73 *
74 * @param route a multicast route
75 * @return a connect point
76 */
77 ConnectPoint fetchSource(McastRoute route);
78
79 /**
80 * Find the list of sinks for this route.
81 *
82 * @param route a multicast route
83 * @return a list of connect points
84 */
85 List<ConnectPoint> fetchSinks(McastRoute route);
86}