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 | */ |
tom | 80c0e5e | 2014-09-08 18:08:58 -0700 | [diff] [blame] | 23 | INDIRECT, |
| 24 | |
| 25 | /** |
| 26 | * Signifies that this link is an edge, i.e. host link. |
| 27 | */ |
| 28 | EDGE |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 29 | } |
tom | 64b7aac | 2014-08-26 00:18:21 -0700 | [diff] [blame] | 30 | |
| 31 | /** |
| 32 | * Returns the link source connection point. |
| 33 | * |
| 34 | * @return link source connection point |
| 35 | */ |
| 36 | ConnectPoint src(); |
| 37 | |
| 38 | /** |
| 39 | * Returns the link destination connection point. |
| 40 | * |
| 41 | * @return link destination connection point |
| 42 | */ |
| 43 | ConnectPoint dst(); |
| 44 | |
tom | eadbb46 | 2014-09-07 16:10:19 -0700 | [diff] [blame] | 45 | /** |
| 46 | * Returns the link type. |
| 47 | * |
| 48 | * @return link type |
| 49 | */ |
| 50 | Type type(); |
| 51 | |
tom | 18567e9 | 2014-08-26 01:39:47 -0700 | [diff] [blame] | 52 | // LinkInfo info(); // Additional link information / decorations |
| 53 | |
tom | 64b7aac | 2014-08-26 00:18:21 -0700 | [diff] [blame] | 54 | } |