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 { |
| 11 | public Port getSourcePort(); |
| 12 | public Port getDestinationPort(); |
| 13 | public Switch getSourceSwitch(); |
| 14 | public Switch getDestinationSwitch(); |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 15 | |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 16 | public long getLastSeenTime(); |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 17 | |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 18 | public int getCost(); |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 19 | public Double getCapacity(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 20 | |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 21 | // Not sure if we want to expose these northbound |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 22 | // Toshi: I think these are unnecessary because we can get them |
| 23 | // Toshi: like "this.getSourcePort().getSwitch()" etc. |
| 24 | public Long getSourceSwitchDpid(); |
| 25 | public Long getSourcePortNumber(); |
| 26 | public Long getDestinationSwitchDpid(); |
| 27 | public Long getDestinationPortNumber(); |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 28 | } |