Jonathan Hart | 472062d | 2014-04-03 10:56:48 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.topology; |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 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. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 5 | * <p/> |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 6 | * Everything returned by these interfaces must be either Unmodifiable view, |
| 7 | * immutable object, or a copy of the original "SB" In-memory Topology. |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 8 | */ |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 9 | public interface Link { |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 10 | /** |
| 11 | * Get the source switch for the link. |
| 12 | * |
| 13 | * @return the source switch for the link. |
| 14 | */ |
| 15 | public Switch getSrcSwitch(); |
Toshio Koide | 0c9106d | 2014-02-19 15:26:38 -0800 | [diff] [blame] | 16 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 17 | /** |
| 18 | * Get the source port for the link. |
| 19 | * |
| 20 | * @return the source port for the link. |
| 21 | */ |
| 22 | public Port getSrcPort(); |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 23 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 24 | /** |
| 25 | * Get the destination switch for the link. |
| 26 | * |
| 27 | * @return the destination switch for the link. |
| 28 | */ |
| 29 | public Switch getDstSwitch(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 30 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 31 | /** |
| 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 Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 40 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 41 | * 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 Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 50 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 51 | * 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 Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 59 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 60 | * TODO: What is the unit? |
| 61 | * |
| 62 | * @return the link capacity. |
| 63 | */ |
| 64 | public Double getCapacity(); |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 65 | } |