Class GatewayEventStreamExpression
java.lang.Object
com.inductiveautomation.eventstream.gateway.expression.GatewayEventStreamExpression
- All Implemented Interfaces:
EventStreamExpression
-
Method Summary
Modifier and TypeMethodDescriptionstatic GatewayEventStreamExpression
create
(EncoderRegistry encoders, CommonContext context, ExpressionValue field, String sourceHint) evaluate
(EventPayload any) 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.void
shutdown()
Unique key for identifying fields in diagnostics.void
startup()
-
Method Details
-
create
public static GatewayEventStreamExpression create(EncoderRegistry encoders, CommonContext context, ExpressionValue field, String sourceHint) throws Exception - Throws:
Exception
-
sourceHint
Description copied from interface:EventStreamExpression
Unique key for identifying fields in diagnostics.- Specified by:
sourceHint
in interfaceEventStreamExpression
- Returns:
- Hint representing the field, typically will be the name of the field.
-
evaluate
Description copied from interface:EventStreamExpression
Evaluates the expression with the provided event.- Specified by:
evaluate
in interfaceEventStreamExpression
- Parameters:
any
- Current event- Throws:
ExpressionException
- When the expression fails to evaluate
-
evaluateTyped
public <T> T evaluateTyped(EventPayload event, Class<T> clazz) throws IllegalArgumentException, ExpressionException Description copied from interface:EventStreamExpression
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.- Specified by:
evaluateTyped
in interfaceEventStreamExpression
- Parameters:
event
- Current eventclazz
- Type of class to coerce to- Throws:
IllegalArgumentException
ExpressionException
-
startup
public void startup() -
shutdown
public void shutdown()
-