blob: 0f4275e246eb3ab392ca1c3a98ca1509dd62e3aa [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 */
23 INDIRECT
24 }
tom64b7aac2014-08-26 00:18:21 -070025
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
tomeadbb462014-09-07 16:10:19 -070040 /**
41 * Returns the link type.
42 *
43 * @return link type
44 */
45 Type type();
46
tom18567e92014-08-26 01:39:47 -070047 // LinkInfo info(); // Additional link information / decorations
48
tom64b7aac2014-08-26 00:18:21 -070049}