Package org.yamcs.events
Interface EventProducer
- All Known Implementing Classes:
AbstractEventProducer,MockupEventProducer,QuietEventProducer,Slf4jEventProducer,StreamEventProducer
public interface EventProducer
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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, generationTimevoidsendCritical(String msg) send an critical event with the type automatically filled in as the caller class namedefault voidsendCritical(String type, String msg) Send a critical event with the given type and messagevoidsendDistress(String msg) send an distress event with the type automatically filled in as the caller class namedefault voidsendDistress(String type, String msg) Send a distress event with the given type and messagedefault voidDeprecated.voidsendEvent(Event.EventSeverity severity, String type, String msg) voidvoidsend an info event with the type automatically filled in as the caller class namedefault voidvoidsendSevere(String msg) send an severe event with the type automatically filled in as the caller class namedefault voidsendSevere(String type, String msg) Send a severe event with the given type and messagevoidsendWarning(String msg) send an warning event with the type automatically filled in as the caller class namedefault voidsendWarning(String type, String msg) Send a warning event with the given type and messagevoidsend an watch event with the type automatically filled in as the caller class namedefault voidSend a warning event with the given type and messagevoidsetRepeatedEventReduction(boolean repeatedEventReduction, long repeatedEventTimeoutMillisec) Enable/disable repeated event reduction.voidsetSeqNo(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.