ScriptProcessor wraps a script written in one of the languages supported by Graal VM.

Type Parma

R the type of value returned by the processor

Type Parameters

  • K = any

    the type of the Map entry key

  • V = any

    the type of the Map entry value

  • R = any

Hierarchy

Constructors

Properties

Methods

Constructors

  • Create a ScriptProcessor that wraps a script written in the specified language and identified by the specified name. The specified args will be passed during execution of the script.

    Type Parameters

    • K = any

    • V = any

    • R = any

    Parameters

    • language: string

      the language the script is written. Currently, only js (for JavaScript) is supported

    • name: string

      the name of the EntryProcessor that needs to be executed

    • Optional args: any[]

      the arguments to be passed to the EntryProcessor

    Returns ScriptProcessor<K, V, R>

Properties

@class: string
args: any[]

The arguments to pass to the script

language: string

The scripting language identifier.

name: string

The script name.

Methods

  • Returns a ConditionalProcessor comprised of this processor and the provided filter.

    The specified entry processor gets invoked if and only if the filter applied to the entry evaluates to true; otherwise the result of the invocation will return null.

    Parameters

    Returns EntryProcessor<K, V, R>