Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.networkgraph; |
| 2 | |
| 3 | import java.net.InetAddress; |
| 4 | import java.util.Collection; |
| 5 | |
| 6 | import net.floodlightcontroller.util.MACAddress; |
| 7 | |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 8 | /** |
| 9 | * Interface of Device Object exposed to the "NB" read-only Topology. |
| 10 | * |
Yuta HIGUCHI | 8d9fddf | 2014-02-10 13:32:16 -0800 | [diff] [blame] | 11 | * TODO What a Device Object represent is unclear at the moment. |
| 12 | * |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 13 | * Everything returned by these interfaces must be either Unmodifiable view, |
| 14 | * immutable object, or a copy of the original "SB" In-memory Topology. |
| 15 | * |
| 16 | */ |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 17 | public interface Device { |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 18 | /** |
| 19 | * Get the device MAC address. |
| 20 | * |
| 21 | * @return the device MAC address. |
| 22 | */ |
| 23 | public MACAddress getMacAddress(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 24 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 25 | /** |
| 26 | * Get the device IP addresses. |
| 27 | * |
| 28 | * @return the device IP addresses. |
| 29 | */ |
| 30 | public Collection<InetAddress> getIpAddress(); |
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 device attachment points. |
| 34 | * |
| 35 | * Add requirement for Iteration order? Latest observed port first. |
| 36 | * |
| 37 | * @return the device attachment points. |
| 38 | */ |
| 39 | public Iterable<Port> getAttachmentPoints(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 40 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 41 | /** |
| 42 | * Get the device last seen time. |
| 43 | * |
| 44 | * TODO: what is the time definition? |
| 45 | * |
| 46 | * @return the device last seen time. |
| 47 | */ |
| 48 | public long getLastSeenTime(); |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 49 | } |