weibit | f32383b | 2014-10-22 10:17:31 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.intent; |
| 2 | |
Thomas Vachuska | e0f804a | 2014-10-27 23:40:48 -0700 | [diff] [blame] | 3 | import org.onlab.onos.core.ApplicationId; |
weibit | f32383b | 2014-10-22 10:17:31 -0700 | [diff] [blame] | 4 | import org.onlab.onos.net.ConnectPoint; |
| 5 | |
| 6 | /** |
weibit | 7e58346 | 2014-10-23 10:14:05 -0700 | [diff] [blame] | 7 | * An optical layer Intent for a connectivity from one Transponder port to another |
weibit | f32383b | 2014-10-22 10:17:31 -0700 | [diff] [blame] | 8 | * Transponder port. No trafficSelector as well as trafficTreament are needed. |
| 9 | * |
| 10 | */ |
weibit | 7e58346 | 2014-10-23 10:14:05 -0700 | [diff] [blame] | 11 | public class OpticalConnectivityIntent extends Intent { |
weibit | f32383b | 2014-10-22 10:17:31 -0700 | [diff] [blame] | 12 | protected ConnectPoint src; |
| 13 | protected ConnectPoint dst; |
| 14 | |
| 15 | /** |
| 16 | * Constructor. |
| 17 | * |
| 18 | * @param id ID for this new Intent object. |
| 19 | * @param src The source transponder port. |
| 20 | * @param dst The destination transponder port. |
| 21 | */ |
weibit | 7e58346 | 2014-10-23 10:14:05 -0700 | [diff] [blame] | 22 | public OpticalConnectivityIntent(ApplicationId appId, ConnectPoint src, ConnectPoint dst) { |
| 23 | super(id(OpticalConnectivityIntent.class, src, dst), |
| 24 | appId, null); |
weibit | f32383b | 2014-10-22 10:17:31 -0700 | [diff] [blame] | 25 | this.src = src; |
| 26 | this.dst = dst; |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Constructor for serializer. |
| 31 | */ |
| 32 | protected OpticalConnectivityIntent() { |
| 33 | super(); |
| 34 | this.src = null; |
| 35 | this.dst = null; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Gets source transponder port. |
| 40 | * |
| 41 | * @return The source transponder port. |
| 42 | */ |
| 43 | public ConnectPoint getSrcConnectPoint() { |
| 44 | return src; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Gets destination transponder port. |
| 49 | * |
| 50 | * @return The source transponder port. |
| 51 | */ |
| 52 | public ConnectPoint getDst() { |
| 53 | return dst; |
| 54 | } |
| 55 | } |