Package org.onosproject.net.device
Class DeviceEvent
- java.lang.Object
-
- org.onosproject.event.AbstractEvent<DeviceEvent.Type,Device>
-
- org.onosproject.net.device.DeviceEvent
-
- All Implemented Interfaces:
Event<DeviceEvent.Type,Device>
public class DeviceEvent extends AbstractEvent<DeviceEvent.Type,Device>
Describes infrastructure device event.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeviceEvent.Type
Type of device events.
-
Constructor Summary
Constructors Constructor Description DeviceEvent(DeviceEvent.Type type, Device device)
Creates an event of a given type and for the specified device and the current time.DeviceEvent(DeviceEvent.Type type, Device device, Port port)
Creates an event of a given type and for the specified device, port and the current time.DeviceEvent(DeviceEvent.Type type, Device device, Port port, long time)
Creates an event of a given type and for the specified device and time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Port
port()
Returns the port subject.java.lang.String
toString()
-
Methods inherited from class org.onosproject.event.AbstractEvent
subject, time, type
-
-
-
-
Constructor Detail
-
DeviceEvent
public DeviceEvent(DeviceEvent.Type type, Device device)
Creates an event of a given type and for the specified device and the current time.- Parameters:
type
- device event typedevice
- event device subject
-
DeviceEvent
public DeviceEvent(DeviceEvent.Type type, Device device, Port port)
Creates an event of a given type and for the specified device, port and the current time.- Parameters:
type
- device event typedevice
- event device subjectport
- optional port subject
-
DeviceEvent
public DeviceEvent(DeviceEvent.Type type, Device device, Port port, long time)
Creates an event of a given type and for the specified device and time.- Parameters:
type
- device event typedevice
- event device subjectport
- optional port subjecttime
- occurrence time
-
-
Method Detail
-
port
public Port port()
Returns the port subject.- Returns:
- port subject or null if the event is not port specific.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractEvent<DeviceEvent.Type,Device>
-
-