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 | |
| 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. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame^] | 10 | * <p/> |
Yuta HIGUCHI | 8d9fddf | 2014-02-10 13:32:16 -0800 | [diff] [blame] | 11 | * TODO What a Device Object represent is unclear at the moment. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame^] | 12 | * <p/> |
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. |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 15 | */ |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 16 | public interface Device { |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 17 | /** |
| 18 | * Get the device MAC address. |
| 19 | * |
| 20 | * @return the device MAC address. |
| 21 | */ |
| 22 | public MACAddress getMacAddress(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 23 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 24 | /** |
| 25 | * Get the device IP addresses. |
| 26 | * |
| 27 | * @return the device IP addresses. |
| 28 | */ |
| 29 | public Collection<InetAddress> getIpAddress(); |
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 device attachment points. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame^] | 33 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 34 | * Add requirement for Iteration order? Latest observed port first. |
| 35 | * |
| 36 | * @return the device attachment points. |
| 37 | */ |
| 38 | public Iterable<Port> getAttachmentPoints(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 39 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 40 | /** |
| 41 | * Get the device last seen time. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame^] | 42 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 43 | * TODO: what is the time definition? |
| 44 | * |
| 45 | * @return the device last seen time. |
| 46 | */ |
| 47 | public long getLastSeenTime(); |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 48 | } |