Class ObserveEvent

  • All Implemented Interfaces:
    Event, java.io.Serializable, scala.Equals, scala.Product

    public class ObserveEvent
    extends ParameterSetType<ObserveEvent>
    implements Event, scala.Product, java.io.Serializable
    Defines an observe event. Constructor is private to ensure eventId is created internally to guarantee unique value.
    See Also:
    Serialized Form
    • Constructor Detail

      • ObserveEvent

        public ObserveEvent​(Id eventId,
                            Prefix source,
                            EventName eventName,
                            UTCTime eventTime,
                            scala.collection.immutable.Set<Parameter<?>> paramSet)
    • Method Detail

      • apply

        public static ObserveEvent apply​(Prefix source,
                                         EventName eventName)
        The apply method is used to create ObserveEvent command by end-user. eventId is not accepted and will be created internally to guarantee unique value.

        Parameters:
        source - prefix representing source of the event
        eventName - the name of event
        Returns:
        a new instance of ObserveEvent with auto-generated eventId, eventTime and empty paramSet
      • apply

        public static ObserveEvent apply​(Prefix source,
                                         EventName eventName,
                                         scala.collection.immutable.Set<Parameter<?>> paramSet)
        The apply method is used to create ObserveEvent command by end-user. eventId is not accepted and will be created internally to guarantee unique value.

        Parameters:
        source - prefix representing source of the event
        eventName - the name of event
        paramSet - an initial set of parameters (keys with values)
        Returns:
        a new instance of ObserveEvent with auto-generated eventId and eventTime
      • eventId

        public Id eventId()
        Description copied from interface: Event
        unique Id for event
        Specified by:
        eventId in interface Event
        Returns:
        (undocumented)
      • source

        public Prefix source()
        Description copied from interface: Event
        Prefix representing source of the event
        Specified by:
        source in interface Event
        Returns:
        (undocumented)
      • eventName

        public EventName eventName()
        Description copied from interface: Event
        The name of event
        Specified by:
        eventName in interface Event
        Returns:
        (undocumented)
      • eventTime

        public UTCTime eventTime()
        Description copied from interface: Event
        The time of event creation
        Specified by:
        eventTime in interface Event
        Returns:
        (undocumented)
      • create

        protected ObserveEvent create​(scala.collection.immutable.Set<Parameter<?>> data)
        Create a new ObserveEvent instance when a parameter is added or removed

        Specified by:
        create in class ParameterSetType<ObserveEvent>
        Parameters:
        data - set of parameters
        Returns:
        a new instance of ObserveEvent with new eventId, eventTime and provided data