Interface EventProducer

All Known Implementing Classes:
AbstractEventProducer, MockupEventProducer, QuietEventProducer, Slf4jEventProducer, StreamEventProducer

public interface EventProducer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the connection to the server; the producer is unusable after this is called
    Creates a default Event Builder with these fields pre-filled: source, seqNo, receptionTime, generationTime
    void
    send an critical event with the type automatically filled in as the caller class name
    default void
    Send a critical event with the given type and message
    void
    send an distress event with the type automatically filled in as the caller class name
    default void
    Send a distress event with the given type and message
    default void
    sendError(String type, String msg)
    Deprecated.
    It is not according to XTCE levels, please use sendCritical(String, String) instead.
    void
    sendEvent(Event.EventSeverity severity, String type, String msg)
     
    void
     
    void
    send an info event with the type automatically filled in as the caller class name
    default void
    sendInfo(String type, String msg)
     
    void
    send an severe event with the type automatically filled in as the caller class name
    default void
    sendSevere(String type, String msg)
    Send a severe event with the given type and message
    void
    send an warning event with the type automatically filled in as the caller class name
    default void
    Send a warning event with the given type and message
    void
    send an watch event with the type automatically filled in as the caller class name
    default void
    sendWatch(String type, String msg)
    Send a warning event with the given type and message
    void
    setRepeatedEventReduction(boolean repeatedEventReduction, long repeatedEventTimeoutMillisec)
    Enable/disable repeated event reduction.
    void
    setSeqNo(int sn)
     
    void
    setSource(String source)
     
  • Method Details

    • setSource

      void setSource(String source)
    • setSeqNo

      void setSeqNo(int sn)
    • sendEvent

      void sendEvent(Event.EventSeverity severity, String type, String msg)
    • sendEvent

      void sendEvent(Db.Event event)
    • sendInfo

      default void sendInfo(String type, String msg)
    • sendError

      @Deprecated default void sendError(String type, String msg)
      Deprecated.
      It is not according to XTCE levels, please use sendCritical(String, String) instead.
    • sendWarning

      default void sendWarning(String type, String msg)
      Send a warning event with the given type and message
    • sendWatch

      default void sendWatch(String type, String msg)
      Send a warning event with the given type and message
    • sendDistress

      default void sendDistress(String type, String msg)
      Send a distress event with the given type and message
    • sendCritical

      default void sendCritical(String type, String msg)
      Send a critical event with the given type and message
    • sendSevere

      default void sendSevere(String type, String msg)
      Send a severe event with the given type and message
    • sendInfo

      void sendInfo(String msg)
      send an info event with the type automatically filled in as the caller class name
      Parameters:
      msg - - event message
    • sendWarning

      void sendWarning(String msg)
      send an warning event with the type automatically filled in as the caller class name
      Parameters:
      msg - - event message
    • sendWatch

      void sendWatch(String msg)
      send an watch event with the type automatically filled in as the caller class name
      Parameters:
      msg - - event message
    • sendDistress

      void sendDistress(String msg)
      send an distress event with the type automatically filled in as the caller class name
      Parameters:
      msg - - event message
    • sendCritical

      void sendCritical(String msg)
      send an critical event with the type automatically filled in as the caller class name
      Parameters:
      msg - - event message
    • sendSevere

      void sendSevere(String msg)
      send an severe event with the type automatically filled in as the caller class name
      Parameters:
      msg - - event message
    • setRepeatedEventReduction

      void setRepeatedEventReduction(boolean repeatedEventReduction, long repeatedEventTimeoutMillisec)
      Enable/disable repeated event reduction. If enabled, the events that are equal are not sent until the timeout expires, case in which an event containing the number of events skipped will be sent. Two events are considered equal if their source, type, severity and message are equal. The sequence count and timestamp do not need to be equal. The event sent in case the timeout is expired is a copy of the last event except that the message is replaced with "Repeated x times: original message"
      Parameters:
      repeatedEventReduction - if true - enable the reduction of events.
      repeatedEventTimeoutMillisec - - how long to keep quiet in case of equal events being sent
    • newEvent

      Db.Event.Builder newEvent()
      Creates a default Event Builder with these fields pre-filled: source, seqNo, receptionTime, generationTime
    • close

      void close()
      Closes the connection to the server; the producer is unusable after this is called