Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScriptProcessor<K, V, R>

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

typeparma

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

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ScriptProcessor(language: string, name: string, args?: any[]): ScriptProcessor
  • 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.

    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

Properties

@class

@class: string

Protected args

args: any[]

The arguments to pass to the script

Protected Readonly language

language: string

The scripting language identifier.

Protected Readonly name

name: string

The script name.

Methods

andThen

when

  • 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>