Class GraalJsEngine

  • All Implemented Interfaces:
    Engine

    public class GraalJsEngine
    extends Jsr223Engine
    An implementation of the expression language evaluator based on GraalVM. Key and value structs are exposed as ProxyObjects, allowing for simplified property references.
    Author:
    Jiri Pechanec
    • Constructor Detail

      • GraalJsEngine

        public GraalJsEngine()
    • Method Detail

      • key

        protected Object key​(org.apache.kafka.connect.connector.ConnectRecord<?> record)
        Overrides:
        key in class Jsr223Engine
      • value

        protected Object value​(org.apache.kafka.connect.connector.ConnectRecord<?> record)
        Overrides:
        value in class Jsr223Engine
      • headers

        protected Object headers​(org.apache.kafka.connect.connector.ConnectRecord<?> record)
        Overrides:
        headers in class Jsr223Engine
      • asProxyObject

        private org.graalvm.polyglot.proxy.ProxyObject asProxyObject​(org.apache.kafka.connect.data.Struct struct)
        Exposes the given struct as a ProxyObject, allowing for simplified property references, also providing any write access.
      • asProxyObject

        private org.graalvm.polyglot.proxy.ProxyObject asProxyObject​(Map<String,​?> map)
        Exposes the given Map as a ProxyObject, allowing for simplified property reference.