Interface EventProducer

    • Method Detail

      • sendEvent

        void sendEvent​(Db.Event event)
      • setSource

        void setSource​(String source)
      • setSeqNo

        void setSeqNo​(int sn)
      • sendWarning

        void sendWarning​(String type,
                         String msg)
        Send a warning event with the given type
        Parameters:
        type -
        msg -
      • sendDistress

        void sendDistress​(String type,
                          String msg)
      • sendCritical

        void sendCritical​(String type,
                          String msg)
      • 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