Package org.yamcs.events
Interface EventProducer
- All Known Implementing Classes:
AbstractEventProducer
,MockupEventProducer
,QuietEventProducer
,Slf4jEventProducer
,StreamEventProducer
public interface EventProducer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the connection to the server; the producer is unusable after this is callednewEvent()
Creates a default Event Builder with these fields pre-filled: source, seqNo, receptionTime, generationTimevoid
sendCritical
(String msg) send an critical event with the type automatically filled in as the caller class namedefault void
sendCritical
(String type, String msg) Send a critical event with the given type and messagevoid
sendDistress
(String msg) send an distress event with the type automatically filled in as the caller class namedefault void
sendDistress
(String type, String msg) Send a distress event with the given type and messagedefault void
Deprecated.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 namedefault void
void
sendSevere
(String msg) send an severe event with the type automatically filled in as the caller class namedefault void
sendSevere
(String type, String msg) Send a severe event with the given type and messagevoid
sendWarning
(String msg) send an warning event with the type automatically filled in as the caller class namedefault void
sendWarning
(String type, String msg) Send a warning event with the given type and messagevoid
send an watch event with the type automatically filled in as the caller class namedefault void
Send a warning event with the given type and messagevoid
setRepeatedEventReduction
(boolean repeatedEventReduction, long repeatedEventTimeoutMillisec) Enable/disable repeated event reduction.void
setSeqNo
(int sn) void
-
Method Details
-
setSource
-
setSeqNo
void setSeqNo(int sn) -
sendEvent
-
sendEvent
-
sendInfo
-
sendError
Deprecated.It is not according to XTCE levels, please usesendCritical(String, String)
instead. -
sendWarning
Send a warning event with the given type and message -
sendWatch
Send a warning event with the given type and message -
sendDistress
Send a distress event with the given type and message -
sendCritical
Send a critical event with the given type and message -
sendSevere
Send a severe event with the given type and message -
sendInfo
send an info event with the type automatically filled in as the caller class name- Parameters:
msg
- - event message
-
sendWarning
send an warning event with the type automatically filled in as the caller class name- Parameters:
msg
- - event message
-
sendWatch
send an watch event with the type automatically filled in as the caller class name- Parameters:
msg
- - event message
-
sendDistress
send an distress event with the type automatically filled in as the caller class name- Parameters:
msg
- - event message
-
sendCritical
send an critical event with the type automatically filled in as the caller class name- Parameters:
msg
- - event message
-
sendSevere
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
-
sendCritical(String, String)
instead.