blob: 0b60b9c7aa2d164682a07423e45725c2393b4187 [file] [log] [blame]
tom64b7aac2014-08-26 00:18:21 -07001package org.onlab.onos.net;
2
tom64b7aac2014-08-26 00:18:21 -07003/**
4 * Abstraction of a network infrastructure link.
5 */
tom43387f32014-08-27 14:42:43 -07006public interface Link extends Provided {
tom18567e92014-08-26 01:39:47 -07007
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
tomd3097b02014-08-26 10:40:29 -070019 * underlying segments or hops, and as such should be used to tag
20 * links traversing optical paths, tunnels or intervening 'dark'
21 * switches.
tom18567e92014-08-26 01:39:47 -070022 */
tom80c0e5e2014-09-08 18:08:58 -070023 INDIRECT,
24
25 /**
26 * Signifies that this link is an edge, i.e. host link.
27 */
28 EDGE
tom18567e92014-08-26 01:39:47 -070029 }
tom64b7aac2014-08-26 00:18:21 -070030
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
tomeadbb462014-09-07 16:10:19 -070045 /**
46 * Returns the link type.
47 *
48 * @return link type
49 */
50 Type type();
51
tom18567e92014-08-26 01:39:47 -070052 // LinkInfo info(); // Additional link information / decorations
53
tom64b7aac2014-08-26 00:18:21 -070054}