blob: 200f682507e3ae337e9a5c107c5e2e928f35559e [file] [log] [blame]
tom64b7aac2014-08-26 00:18:21 -07001package org.onlab.onos.net;
2
3import org.onlab.onos.net.provider.Provided;
4
5/**
6 * Abstraction of a network infrastructure link.
7 */
tom18567e92014-08-26 01:39:47 -07008public interface Link extends Provided { // TODO: Also should extend graph Edge once the graph module is checked in
9
10 /**
11 * Coarse representation of the link type.
12 */
13 public enum Type {
14 /**
15 * Signifies that this is a direct single-segment link.
16 */
17 DIRECT,
18
19 /**
20 * Signifies that this link is potentially comprised from multiple
tomd3097b02014-08-26 10:40:29 -070021 * underlying segments or hops, and as such should be used to tag
22 * links traversing optical paths, tunnels or intervening 'dark'
23 * switches.
tom18567e92014-08-26 01:39:47 -070024 */
25 INDIRECT
26 }
tom64b7aac2014-08-26 00:18:21 -070027
28 /**
29 * Returns the link source connection point.
30 *
31 * @return link source connection point
32 */
33 ConnectPoint src();
34
35 /**
36 * Returns the link destination connection point.
37 *
38 * @return link destination connection point
39 */
40 ConnectPoint dst();
41
tom18567e92014-08-26 01:39:47 -070042 // LinkInfo info(); // Additional link information / decorations
43
tom64b7aac2014-08-26 00:18:21 -070044}