blob: 2acf7dce6189d8150bc4754d6151c5078b26e795 [file] [log] [blame]
Jonathan Hart472062d2014-04-03 10:56:48 -07001package net.onrc.onos.core.topology;
Jonathan Hart062a2e82014-02-03 09:41:57 -08002
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08003/**
4 * Interface of Link Object exposed to the "NB" read-only Topology.
Ray Milkey269ffb92014-04-03 14:43:30 -07005 * <p/>
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08006 * Everything returned by these interfaces must be either Unmodifiable view,
7 * immutable object, or a copy of the original "SB" In-memory Topology.
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08008 */
Jonathan Hart062a2e82014-02-03 09:41:57 -08009public interface Link {
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080010 /**
11 * Get the source switch for the link.
12 *
13 * @return the source switch for the link.
14 */
15 public Switch getSrcSwitch();
Toshio Koide0c9106d2014-02-19 15:26:38 -080016
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080017 /**
18 * Get the source port for the link.
19 *
20 * @return the source port for the link.
21 */
22 public Port getSrcPort();
Toshio Koide2f570c12014-02-06 16:55:32 -080023
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080024 /**
25 * Get the destination switch for the link.
26 *
27 * @return the destination switch for the link.
28 */
29 public Switch getDstSwitch();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080030
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080031 /**
32 * Get the destination port for the link.
33 *
34 * @return the destination port for the link.
35 */
36 public Port getDstPort();
37
38 /**
39 * Get the last seen time for the link.
Ray Milkey269ffb92014-04-03 14:43:30 -070040 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080041 * TODO: Not implemented yet.
42 * TODO: what is the time definition?
43 *
44 * @return the last seen time for the link.
45 */
46 public long getLastSeenTime();
47
48 /**
49 * Get the link cost.
Ray Milkey269ffb92014-04-03 14:43:30 -070050 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080051 * TODO: What is the unit?
52 *
53 * @param return the link cost.
54 */
55 public int getCost();
56
57 /**
58 * Get the link capacity.
Ray Milkey269ffb92014-04-03 14:43:30 -070059 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080060 * TODO: What is the unit?
61 *
62 * @return the link capacity.
63 */
64 public Double getCapacity();
Jonathan Hart062a2e82014-02-03 09:41:57 -080065}