Package org.onosproject.event
Class AbstractEvent<T extends java.lang.Enum,S>
- java.lang.Object
-
- org.onosproject.event.AbstractEvent<T,S>
-
- All Implemented Interfaces:
Event<T,S>
- Direct Known Subclasses:
AlarmEvent
,ApplicationEvent
,ClusterEvent
,ClusterMetadataEvent
,ComponentConfigEvent
,ControlMessageEvent
,DeviceAgentEvent
,DeviceEvent
,DeviceKeyEvent
,DriverEvent
,EdgePortEvent
,FlowRuleBatchEvent
,FlowRuleEvent
,GroupEvent
,HostEvent
,HostProbingEvent
,IntentEvent
,InterfaceEvent
,LeadershipEvent
,LinkEvent
,MastershipEvent
,McastEvent
,MeterEvent
,NetworkConfigEvent
,ObjectiveEvent
,PacketEvent
,PartitionEvent
,PiPipeconfDeviceMappingEvent
,PiPipeconfEvent
,PiPipeconfWatchdogEvent
,PiTranslationEvent
,RegionEvent
,ReplicaInfoEvent
,ResourceEvent
,TopologyEvent
,UiModelEvent
,UpgradeEvent
,WorkPartitionEvent
public class AbstractEvent<T extends java.lang.Enum,S> extends java.lang.Object implements Event<T,S>
Base event implementation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEvent(T type, S subject)
Creates an event of a given type and for the specified subject and the current time.protected
AbstractEvent(T type, S subject, long time)
Creates an event of a given type and for the specified subject and time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S
subject()
Returns the subject of the event.long
time()
Returns the timestamp of when the event occurred, given in milliseconds since the start of epoch.java.lang.String
toString()
T
type()
Returns the type of the event.
-
-
-
Method Detail
-
time
public long time()
Description copied from interface:Event
Returns the timestamp of when the event occurred, given in milliseconds since the start of epoch.
-
subject
public S subject()
Description copied from interface:Event
Returns the subject of the event.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-