Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.networkgraph; |
| 2 | |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 3 | /** |
| 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 Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 10 | public interface Link { |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 11 | /** |
| 12 | * Get the source switch for the link. |
| 13 | * |
| 14 | * @return the source switch for the link. |
| 15 | */ |
| 16 | public Switch getSrcSwitch(); |
Toshio Koide | 0c9106d | 2014-02-19 15:26:38 -0800 | [diff] [blame] | 17 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 18 | /** |
| 19 | * Get the source port for the link. |
| 20 | * |
| 21 | * @return the source port for the link. |
| 22 | */ |
| 23 | public Port getSrcPort(); |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 24 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 25 | /** |
| 26 | * Get the destination switch for the link. |
| 27 | * |
| 28 | * @return the destination switch for the link. |
| 29 | */ |
| 30 | public Switch getDstSwitch(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 31 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 32 | /** |
| 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 Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 66 | } |