blob: 68edc2e0d8cd3dc086430e80185648cd1cce2bed [file] [log] [blame]
alshabibeff00542015-09-23 13:22:33 -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 */
16package org.onosproject.mfwd.impl;
17
18import static com.google.common.base.Preconditions.checkNotNull;
19import org.onlab.packet.IpPrefix;
20
21/**
22 * This class represents and specific multicast senders source address. Objects from
23 * this class will belong to the sources collection of the multicast group.
24 */
25public class McastRouteSource extends McastRouteBase {
26
27 // A reference to our parent group
28 private McastRouteGroup group;
29
30 /**
31 * Create a multicast source with IpPrefixes.
32 *
33 * @param source the source address
34 * @param group the group address
35 */
36 public McastRouteSource(IpPrefix source, IpPrefix group) {
37 super(checkNotNull(source), checkNotNull(group));
38 }
39
40 /**
41 * Set our parent multicast group.
42 *
43 * @param group the group this source belongs to
44 */
45 public void setGroup(McastRouteGroup group) {
46 this.group = group;
47 }
48}