Package org.sensorhub.api.event
Class Event
java.lang.Object
org.sensorhub.api.event.Event
- Direct Known Subclasses:
DeviceScanEvent
,ModuleEvent
,SystemEvent
Immutable base class for all sensor hub events. All sub-classes should remain immutable.
- Since:
- Nov 5, 2010
-
Field Details
-
timeStamp
protected long timeStamp -
source
-
-
Constructor Details
-
Event
public Event()
-
-
Method Details
-
getTimeStamp
public long getTimeStamp()- Returns:
- Time stamp of event creation (Unix time in ms since 1970)
-
getSourceID
Gets the ID of the source of event.- Returns:
- ID of the event source
-
getSource
Gets the source of the event as an object reference.Note that this is not guaranteed to be available when using events in a distributed system.
- Returns:
- Source object that generated this event or null
-
toString
-