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 | |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 3 | import net.floodlightcontroller.util.MACAddress; |
Yuta HIGUCHI | bfc77f0 | 2014-07-14 22:50:25 -0700 | [diff] [blame] | 4 | import net.onrc.onos.core.topology.web.serializers.HostSerializer; |
Yuta HIGUCHI | a7f1cdd | 2014-06-09 15:05:20 -0700 | [diff] [blame] | 5 | |
Pavlin Radoslavov | 1cbfcae | 2014-05-23 17:28:08 -0700 | [diff] [blame] | 6 | import org.codehaus.jackson.map.annotate.JsonSerialize; |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 7 | |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 8 | /** |
Yuta HIGUCHI | bfc77f0 | 2014-07-14 22:50:25 -0700 | [diff] [blame] | 9 | * Interface of Host Object exposed to the "NB" read-only Topology. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 10 | * <p/> |
Yuta HIGUCHI | bfc77f0 | 2014-07-14 22:50:25 -0700 | [diff] [blame] | 11 | * TODO What a Host 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 | */ |
Yuta HIGUCHI | bfc77f0 | 2014-07-14 22:50:25 -0700 | [diff] [blame] | 16 | @JsonSerialize(using = HostSerializer.class) |
| 17 | public interface Host extends ITopologyElement { |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 18 | /** |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 19 | * Gets the Host MAC address. |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 20 | * |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 21 | * @return the Host MAC address. |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 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 | /** |
Sangho Shin | 2f26369 | 2014-09-15 14:09:41 -0700 | [diff] [blame] | 26 | * Gets the Host IP address. |
| 27 | * |
| 28 | * @return the Host IP address. |
| 29 | */ |
| 30 | public int getIpAddress(); |
| 31 | |
| 32 | |
| 33 | /** |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 34 | * Gets the Host attachment points. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 35 | * <p/> |
Yuta HIGUCHI | bf0a871 | 2014-06-30 18:59:46 -0700 | [diff] [blame] | 36 | * TODO: There is only 1 attachment point right now. |
| 37 | * TODO: Add requirement for Iteration order? Latest observed port first. |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 38 | * |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 39 | * @return the Host attachment points. |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 40 | */ |
| 41 | public Iterable<Port> getAttachmentPoints(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 42 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 43 | /** |
Pavlin Radoslavov | a5637c0 | 2014-07-30 15:55:11 -0700 | [diff] [blame] | 44 | * Gets the Host last seen time. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 45 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 46 | * |
Pavlin Radoslavov | 53b208a | 2014-07-28 13:16:11 -0700 | [diff] [blame] | 47 | * @return the Host last seen time. (UTC in ms) |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 48 | */ |
| 49 | public long getLastSeenTime(); |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 50 | } |