blob: 3e23dc1327a88175dad103bdd538ffb9d336f6e3 [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 */
Thomas Vachuskac96058a2014-10-20 23:00:16 -07006public interface Link extends Annotated, Provided, NetworkResource {
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 */
Thomas Vachuska0e752bd2014-10-22 22:33:41 -070028 EDGE,
29
30 /**
31 * Signifies that this link represents a logical link backed by
32 * some form of a tunnel.
33 */
34 TUNNEL,
35
36 /**
37 * Signifies that this link is realized by optical connection.
38 */
39 OPTICAL
tom18567e92014-08-26 01:39:47 -070040 }
tom64b7aac2014-08-26 00:18:21 -070041
42 /**
43 * Returns the link source connection point.
44 *
45 * @return link source connection point
46 */
47 ConnectPoint src();
48
49 /**
50 * Returns the link destination connection point.
51 *
52 * @return link destination connection point
53 */
54 ConnectPoint dst();
55
tomeadbb462014-09-07 16:10:19 -070056 /**
57 * Returns the link type.
58 *
59 * @return link type
60 */
61 Type type();
62
tom64b7aac2014-08-26 00:18:21 -070063}