tom | 64b7aac | 2014-08-26 00:18:21 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net; |
| 2 | |
tom | 64b7aac | 2014-08-26 00:18:21 -0700 | [diff] [blame] | 3 | /** |
| 4 | * Abstraction of a network infrastructure link. |
| 5 | */ |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 6 | public interface Link extends Provided { |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 7 | |
| 8 | /** |
| 9 | * Coarse representation of the link type. |
| 10 | */ |
| 11 | public enum Type { |
| 12 | /** |
| 13 | * Signifies that this is a direct single-segment link. |
| 14 | */ |
| 15 | DIRECT, |
| 16 | |
| 17 | /** |
| 18 | * Signifies that this link is potentially comprised from multiple |
tom | d3097b0 | 2014-08-26 10:40:29 -0700 | [diff] [blame] | 19 | * underlying segments or hops, and as such should be used to tag |
| 20 | * links traversing optical paths, tunnels or intervening 'dark' |
| 21 | * switches. |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 22 | */ |
| 23 | INDIRECT |
| 24 | } |
tom | 64b7aac | 2014-08-26 00:18:21 -0700 | [diff] [blame] | 25 | |
| 26 | /** |
| 27 | * Returns the link source connection point. |
| 28 | * |
| 29 | * @return link source connection point |
| 30 | */ |
| 31 | ConnectPoint src(); |
| 32 | |
| 33 | /** |
| 34 | * Returns the link destination connection point. |
| 35 | * |
| 36 | * @return link destination connection point |
| 37 | */ |
| 38 | ConnectPoint dst(); |
| 39 | |
tom | eadbb46 | 2014-09-07 16:10:19 -0700 | [diff] [blame^] | 40 | /** |
| 41 | * Returns the link type. |
| 42 | * |
| 43 | * @return link type |
| 44 | */ |
| 45 | Type type(); |
| 46 | |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 47 | // LinkInfo info(); // Additional link information / decorations |
| 48 | |
tom | 64b7aac | 2014-08-26 00:18:21 -0700 | [diff] [blame] | 49 | } |