blob: 996997a4dde3e893536caab3148eb9ff9b90efa2 [file] [log] [blame]
Jonathan Hart062a2e82014-02-03 09:41:57 -08001package net.onrc.onos.ofcontroller.networkgraph;
2
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08003/**
4 * Interface of Link Object exposed to the "NB" read-only Topology.
5 *
6 * Everything returned by these interfaces must be either Unmodifiable view,
7 * immutable object, or a copy of the original "SB" In-memory Topology.
8 *
9 */
Jonathan Hart062a2e82014-02-03 09:41:57 -080010public interface Link {
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080011 /**
12 * Get the source switch for the link.
13 *
14 * @return the source switch for the link.
15 */
16 public Switch getSrcSwitch();
Toshio Koide0c9106d2014-02-19 15:26:38 -080017
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080018 /**
19 * Get the source port for the link.
20 *
21 * @return the source port for the link.
22 */
23 public Port getSrcPort();
Toshio Koide2f570c12014-02-06 16:55:32 -080024
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080025 /**
26 * Get the destination switch for the link.
27 *
28 * @return the destination switch for the link.
29 */
30 public Switch getDstSwitch();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080031
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080032 /**
33 * Get the destination port for the link.
34 *
35 * @return the destination port for the link.
36 */
37 public Port getDstPort();
38
39 /**
40 * Get the last seen time for the link.
41 *
42 * TODO: Not implemented yet.
43 * TODO: what is the time definition?
44 *
45 * @return the last seen time for the link.
46 */
47 public long getLastSeenTime();
48
49 /**
50 * Get the link cost.
51 *
52 * TODO: What is the unit?
53 *
54 * @param return the link cost.
55 */
56 public int getCost();
57
58 /**
59 * Get the link capacity.
60 *
61 * TODO: What is the unit?
62 *
63 * @return the link capacity.
64 */
65 public Double getCapacity();
Jonathan Hart062a2e82014-02-03 09:41:57 -080066}