blob: 46f5f9a104c47f0123363291f51525372aa6556e [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 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 */
weibitf32383b2014-10-22 10:17:31 -070016package org.onlab.onos.net.intent;
17
Thomas Vachuskae0f804a2014-10-27 23:40:48 -070018import org.onlab.onos.core.ApplicationId;
weibitf32383b2014-10-22 10:17:31 -070019import org.onlab.onos.net.ConnectPoint;
20
21/**
weibit7e583462014-10-23 10:14:05 -070022 * An optical layer Intent for a connectivity from one Transponder port to another
weibitf32383b2014-10-22 10:17:31 -070023 * Transponder port. No trafficSelector as well as trafficTreament are needed.
24 *
25 */
weibit7e583462014-10-23 10:14:05 -070026public class OpticalConnectivityIntent extends Intent {
weibitf32383b2014-10-22 10:17:31 -070027 protected ConnectPoint src;
28 protected ConnectPoint dst;
29
30 /**
31 * Constructor.
32 *
33 * @param id ID for this new Intent object.
34 * @param src The source transponder port.
35 * @param dst The destination transponder port.
36 */
weibit7e583462014-10-23 10:14:05 -070037 public OpticalConnectivityIntent(ApplicationId appId, ConnectPoint src, ConnectPoint dst) {
38 super(id(OpticalConnectivityIntent.class, src, dst),
39 appId, null);
weibitf32383b2014-10-22 10:17:31 -070040 this.src = src;
41 this.dst = dst;
42 }
43
44 /**
45 * Constructor for serializer.
46 */
47 protected OpticalConnectivityIntent() {
48 super();
49 this.src = null;
50 this.dst = null;
51 }
52
53 /**
54 * Gets source transponder port.
55 *
56 * @return The source transponder port.
57 */
58 public ConnectPoint getSrcConnectPoint() {
59 return src;
60 }
61
62 /**
63 * Gets destination transponder port.
64 *
65 * @return The source transponder port.
66 */
67 public ConnectPoint getDst() {
68 return dst;
69 }
70}