Class WasmExpression

java.lang.Object
org.apache.camel.support.ExpressionSupport
org.apache.camel.support.ExpressionAdapter
org.apache.camel.language.wasm.WasmExpression
All Implemented Interfaces:
org.apache.camel.Expression, org.apache.camel.Predicate, org.apache.camel.spi.ExpressionResultTypeAware

public class WasmExpression extends org.apache.camel.support.ExpressionAdapter implements org.apache.camel.spi.ExpressionResultTypeAware
  • Constructor Details

    • WasmExpression

      public WasmExpression(String expression)
  • Method Details

    • init

      public void init(org.apache.camel.CamelContext camelContext)
      Specified by:
      init in interface org.apache.camel.Expression
      Specified by:
      init in interface org.apache.camel.Predicate
      Overrides:
      init in class org.apache.camel.support.ExpressionAdapter
    • getExpressionText

      public String getExpressionText()
      Specified by:
      getExpressionText in interface org.apache.camel.spi.ExpressionResultTypeAware
    • getResultType

      public Class<?> getResultType()
      Specified by:
      getResultType in interface org.apache.camel.spi.ExpressionResultTypeAware
    • setResultType

      public void setResultType(Class<?> resultType)
    • getResultTypeName

      public String getResultTypeName()
    • setResultTypeName

      public void setResultTypeName(String resultTypeName)
    • getHeaderName

      public String getHeaderName()
    • setHeaderName

      public void setHeaderName(String headerName)
      Name of the header to use as input instead of the message body.

      It has higher precedence than the propertyName if both are set.
    • getPropertyName

      public String getPropertyName()
    • setPropertyName

      public void setPropertyName(String propertyName)
      Name of the property to use as input instead of the message body.

      It has lower precedence than the headerName if both are set.
    • getModule

      public String getModule()
    • setModule

      public void setModule(String module)
      Set the module (the distributable, loadable, and executable unit of code in WebAssembly) resource that provides the expression function.
    • matches

      public boolean matches(org.apache.camel.Exchange exchange)
      Specified by:
      matches in interface org.apache.camel.Predicate
      Overrides:
      matches in class org.apache.camel.support.ExpressionSupport
    • evaluate

      public Object evaluate(org.apache.camel.Exchange exchange)
      Overrides:
      evaluate in class org.apache.camel.support.ExpressionSupport