Interface EventStreamExpression
- All Known Implementing Classes:
GatewayEventStreamExpression
public interface EventStreamExpression
Expression used in
EventStreamHandler
for extracting data and metadata from EventPayload
.
The lifecycle of the EventStreamExpression
is bound to the lifecycle of the Event Stream, so no
further configuration of the express is required.-
Method Summary
Modifier and TypeMethodDescriptionevaluate
(EventPayload event) Evaluates the expression with the provided event.<T> T
evaluateTyped
(EventPayload event, Class<T> clazz) Attempts to evaluate and coerce the express to a specific type.Unique key for identifying fields in diagnostics.
-
Method Details
-
sourceHint
String sourceHint()Unique key for identifying fields in diagnostics.- Returns:
- Hint representing the field, typically will be the name of the field.
-
evaluate
Evaluates the expression with the provided event.- Parameters:
event
- Current event- Throws:
ExpressionException
- When the expression fails to evaluate
-
evaluateTyped
<T> T evaluateTyped(EventPayload event, Class<T> clazz) throws IllegalArgumentException, ExpressionException Attempts to evaluate and coerce the express to a specific type. Throws an exception if coercion isn't possible or the expression can't be evaluated.- Parameters:
event
- Current eventclazz
- Type of class to coerce to- Throws:
IllegalArgumentException
ExpressionException
-