blob: d11dc7cbc9c4a0a82c9e20714bfdc9c3cb6d231c [file] [log] [blame]
Brian O'Connorb876bf12014-10-02 14:59:37 -07001package org.onlab.onos.net.intent;
2
3import org.onlab.onos.net.ConnectPoint;
4
5// TODO: consider if this intent should be sub-class of ConnectivityIntent
6/**
7 * An optical layer Intent for a connectivity from a transponder port to another
8 * transponder port.
9 * <p>
10 * This class doesn't accepts lambda specifier. This class computes path between
11 * ports and assign lambda automatically. The lambda can be specified using
12 * OpticalPathFlow class.
13 */
14public class OpticalConnectivityIntent extends AbstractIntent {
15 protected ConnectPoint srcConnectPoint;
16 protected ConnectPoint dstConnectPoint;
17
18 /**
19 * Constructor.
20 *
21 * @param id ID for this new Intent object.
22 * @param srcConnectPoint The source transponder port.
23 * @param dstConnectPoint The destination transponder port.
24 */
25 public OpticalConnectivityIntent(IntentId id,
26 ConnectPoint srcConnectPoint, ConnectPoint dstConnectPoint) {
27 super(id);
28 this.srcConnectPoint = srcConnectPoint;
29 this.dstConnectPoint = dstConnectPoint;
30 }
31
32 /**
33 * Constructor for serializer.
34 */
35 protected OpticalConnectivityIntent() {
36 super();
37 this.srcConnectPoint = null;
38 this.dstConnectPoint = null;
39 }
40
41 /**
42 * Gets source transponder port.
43 *
44 * @return The source transponder port.
45 */
46 public ConnectPoint getSrcConnectPoint() {
47 return srcConnectPoint;
48 }
49
50 /**
51 * Gets destination transponder port.
52 *
53 * @return The source transponder port.
54 */
55 public ConnectPoint getDstConnectPoint() {
56 return dstConnectPoint;
57 }
58}