Package org.yamcs.events
Interface EventProducer
-
- All Known Implementing Classes:
AbstractEventProducer,MockupEventProducer,QuietEventProducer,Slf4jEventProducer,StreamEventProducer
public interface EventProducer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidclose()Closes the connection to the server; the producer is unusable after this is calledDb.Event.BuildernewEvent()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 namevoidsendCritical(String type, String msg)voidsendDistress(String msg)send an distress event with the type automatically filled in as the caller class namevoidsendDistress(String type, String msg)voidsendError(String type, String msg)Deprecated.not according to XTCE levels, usesendCritical(String, String)voidsendEvent(Db.Event event)voidsendInfo(String msg)send an info event with the type automatically filled in as the caller class namevoidsendInfo(String type, String msg)voidsendSevere(String msg)send an severe event with the type automatically filled in as the caller class namevoidsendSevere(String type, String msg)voidsendWarning(String msg)send an warning event with the type automatically filled in as the caller class namevoidsendWarning(String type, String msg)Send a warning event with the given typevoidsendWatch(String msg)send an watch event with the type automatically filled in as the caller class namevoidsendWatch(String type, String msg)voidsetRepeatedEventReduction(boolean repeatedEventReduction, long repeatedEventTimeoutMillisec)Enable/disable repeated event reduction.voidsetSeqNo(int sn)voidsetSource(String source)
-
-
-
Method Detail
-
sendEvent
void sendEvent(Db.Event event)
-
setSource
void setSource(String source)
-
setSeqNo
void setSeqNo(int sn)
-
sendError
@Deprecated void sendError(String type, String msg)
Deprecated.not according to XTCE levels, usesendCritical(String, String)
-
sendWarning
void sendWarning(String type, String msg)
Send a warning event with the given type- Parameters:
type-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
-
-