Class SystemEvent

java.lang.Object
org.sensorhub.api.event.Event
org.sensorhub.api.system.SystemEvent
Direct Known Subclasses:
CommandStreamEvent, DataStreamEvent, FoiAddedEvent, ProcessingEvent, SystemAddedEvent, SystemChangedEvent, SystemDisabledEvent, SystemEnabledEvent, SystemRemovedEvent

public abstract class SystemEvent extends Event

Base class for all events that are associated to a particular system.
Events can be generated by top level systems and by subsystems.

Since:
Apr 23, 2015
  • Field Details

    • systemUID

      protected String systemUID
    • sourceID

      protected String sourceID
    • systemID

      protected BigId systemID
  • Constructor Details

    • SystemEvent

      public SystemEvent(long timeStamp, String sysUID)
    • SystemEvent

      public SystemEvent(String sysUID)
  • Method Details

    • getSystemUID

      public String getSystemUID()
      Gets the unique ID of the system related to this event.
      For system groups (e.g. sensor networks), it will be either the UID of the group as a whole (if the event is global) or the UID of a single subsystem within the group (if the event applies only to that member)
      Returns:
      Unique ID of related system
    • getSystemID

      public BigId getSystemID()
      Returns:
      Local ID of the system related to this event
    • assignSystemID

      public void assignSystemID(BigId internalID)
      Called by the framework to assign the system's local ID to this event. This can only be called once and must be called before the event is dispatched.
      Parameters:
      internalID - Local ID of related system
    • getSourceID

      public String getSourceID()
      Description copied from class: Event
      Gets the ID of the source of event.
      Specified by:
      getSourceID in class Event
      Returns:
      ID of the event source