public class SimpleMessageProcessingContext extends Object implements MessageProcessingContext
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleMessageProcessingContext.Builder |
| Modifier and Type | Method and Description |
|---|---|
static SimpleMessageProcessingContext.Builder |
builder() |
<T> T |
evalExpression(String expression,
Class<T> targetClass,
io.continual.util.data.exprEval.ExprDataSource... addl)
Evaluate a ${} expression in the message context, which includes the addl srcs,
the message, then the stream processing context, in that order.
|
String |
getId()
Get a unique serial number for the current message
|
Message |
getMessage()
Get the message being processed
|
MetricsCatalog |
getMetrics()
Get a metrics catalog appropriate for the scope of this message's processing
|
Sink |
getSink(String sinkName)
Get a named sink from the program
|
Source |
getSource(String sinkName)
Get a named source from the program
|
StreamProcessingContext |
getStreamProcessingContext()
Get the stream processing context associated with the current message.
|
boolean |
shouldContinue()
Should the engine continue to process this message?
|
void |
stopProcessing()
Ask the engine to stop processing this message
|
void |
stopProcessing(String warningText)
Ask the engine to stop processing this message and log the warning.
|
void |
warn(String warningText)
report a warning about processing
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevalExpression, evalExpressionpublic static SimpleMessageProcessingContext.Builder builder()
public StreamProcessingContext getStreamProcessingContext()
MessageProcessingContextgetStreamProcessingContext in interface MessageProcessingContextpublic Message getMessage()
MessageProcessingContextgetMessage in interface MessageProcessingContextpublic String getId()
MessageProcessingContextgetId in interface MessageProcessingContextpublic Source getSource(String sinkName)
MessageProcessingContextgetSource in interface MessageProcessingContextsinkName - the name of a sourcepublic Sink getSink(String sinkName)
MessageProcessingContextgetSink in interface MessageProcessingContextpublic boolean shouldContinue()
MessageProcessingContextshouldContinue in interface MessageProcessingContextpublic void stopProcessing()
MessageProcessingContextstopProcessing in interface MessageProcessingContextpublic void stopProcessing(String warningText)
MessageProcessingContextstopProcessing in interface MessageProcessingContextpublic void warn(String warningText)
MessageProcessingContextwarn in interface MessageProcessingContextpublic <T> T evalExpression(String expression, Class<T> targetClass, io.continual.util.data.exprEval.ExprDataSource... addl)
MessageProcessingContextevalExpression in interface MessageProcessingContextpublic MetricsCatalog getMetrics()
MessageProcessingContextgetMetrics in interface MessageProcessingContextCopyright © 2021 continual.io. All rights reserved.