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