tom | 64b7aac | 2014-08-26 00:18:21 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.host; |
| 2 | |
| 3 | import org.onlab.onos.event.AbstractEvent; |
| 4 | import org.onlab.onos.net.Host; |
| 5 | |
| 6 | /** |
| 7 | * Describes end-station host event. |
| 8 | */ |
| 9 | public class HostEvent extends AbstractEvent<HostEvent.Type, Host> { |
| 10 | |
| 11 | /** |
| 12 | * Type of host events. |
| 13 | */ |
| 14 | public enum Type { |
| 15 | /** |
| 16 | * Signifies that a new host has been detected. |
| 17 | */ |
| 18 | HOST_ADDED, |
| 19 | |
| 20 | /** |
| 21 | * Signifies that a host has been removed. |
| 22 | */ |
| 23 | HOST_REMOVED, |
| 24 | |
| 25 | /** |
| 26 | * Signifies that a host location has changed. |
| 27 | */ |
| 28 | HOST_MOVED |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Creates an event of a given type and for the specified host and the |
| 33 | * current time. |
| 34 | * |
| 35 | * @param type host event type |
| 36 | * @param host event host subject |
| 37 | */ |
| 38 | public HostEvent(Type type, Host host) { |
| 39 | super(type, host); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Creates an event of a given type and for the specified host and time. |
| 44 | * |
| 45 | * @param type host event type |
| 46 | * @param host event host subject |
| 47 | * @param time occurrence time |
| 48 | */ |
| 49 | public HostEvent(Type type, Host host, long time) { |
| 50 | super(type, host, time); |
| 51 | } |
| 52 | |
| 53 | } |