public interface StreamProcessingContext
| Modifier and Type | Interface and Description |
|---|---|
static class |
StreamProcessingContext.NoSuitableObjectException
No suitable object found.
|
| Modifier and Type | Method and Description |
|---|---|
StreamProcessingContext |
addNamedObject(String name,
Object o)
Add a named object of any type.
|
boolean |
checkFlag(String flagName)
Get the value of a given flag.
|
boolean |
clearFlag(String flagName)
Clear a flag
|
String |
evalExpression(String expression)
Evaluate a ${} expression in the context of this stream processor
|
void |
fail(String warningText)
Report that the stream processing has failed.
|
boolean |
failed()
Returns true if fail() has been called
|
MetricsCatalog |
getMetrics()
Get the metrics catalog into which this processing context reports.
|
Object |
getNamedObject(String name)
Get a raw object reference for the instance with the given name
|
<T> T |
getNamedObject(String name,
Class<T> clazz)
Get a typed object with the given name.
|
Identity |
getOperator()
Get the identity of the operator running this process.
|
<T> T |
getReqdNamedObject(String name,
Class<T> clazz)
Get a typed object with the given name and throw an exception if it's not available.
|
Source |
getSource()
Get this stream's source
|
StreamProcessingContext |
removeNamedObject(String name)
Remove a named object from this context, if it exists
|
void |
requeue(MessageAndRouting mr)
Requeue a message
|
boolean |
setFlag(String flagName)
Set a boolean flag
|
void |
warn(String warningText)
report a warning about processing the stream
|
Source getSource()
void warn(String warningText)
warningText - void fail(String warningText)
warningText - boolean failed()
Identity getOperator()
StreamProcessingContext addNamedObject(String name, Object o)
name - o - Object getNamedObject(String name)
name - <T> T getNamedObject(String name, Class<T> clazz) throws ClassCastException
name - clazz - ClassCastException<T> T getReqdNamedObject(String name, Class<T> clazz) throws StreamProcessingContext.NoSuitableObjectException
name - clazz - StreamProcessingContext.NoSuitableObjectExceptionStreamProcessingContext removeNamedObject(String name)
name - boolean setFlag(String flagName)
flagName - boolean checkFlag(String flagName)
flagName - boolean clearFlag(String flagName)
flagName - String evalExpression(String expression)
expression - void requeue(MessageAndRouting mr)
mr - MetricsCatalog getMetrics()
Copyright © 2022 continual.io. All rights reserved.