Package org.onosproject.net.host
Class HostEvent
- java.lang.Object
-
- org.onosproject.event.AbstractEvent<HostEvent.Type,Host>
-
- org.onosproject.net.host.HostEvent
-
- All Implemented Interfaces:
Event<HostEvent.Type,Host>
public class HostEvent extends AbstractEvent<HostEvent.Type,Host>
Describes end-station host event.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HostEvent.Type
Type of host events.
-
Constructor Summary
Constructors Constructor Description HostEvent(HostEvent.Type type, Host host)
Creates an event of a given type and for the specified host and the current time.HostEvent(HostEvent.Type type, Host host, long time)
Creates an event of a given type and for the specified host and time.HostEvent(HostEvent.Type type, Host host, Host prevSubject)
Creates an event with previous subject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Host
prevSubject()
Gets the previous subject in this host event.String
toString()
-
Methods inherited from class org.onosproject.event.AbstractEvent
subject, time, type
-
-
-
-
Constructor Detail
-
HostEvent
public HostEvent(HostEvent.Type type, Host host)
Creates an event of a given type and for the specified host and the current time.- Parameters:
type
- host event typehost
- event host subject
-
HostEvent
public HostEvent(HostEvent.Type type, Host host, long time)
Creates an event of a given type and for the specified host and time.- Parameters:
type
- host event typehost
- event host subjecttime
- occurrence time
-
HostEvent
public HostEvent(HostEvent.Type type, Host host, Host prevSubject)
Creates an event with previous subject. The previous subject is ignored if the type is not moved or updated- Parameters:
type
- host event typehost
- event host subjectprevSubject
- previous host subject
-
-
Method Detail
-
prevSubject
public Host prevSubject()
Gets the previous subject in this host event.- Returns:
- the previous subject, or null if previous subject is not specified.
-
toString
public String toString()
- Overrides:
toString
in classAbstractEvent<HostEvent.Type,Host>
-
-