Class KotlinScriptExecutor

java.lang.Object
org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
org.springframework.integration.scripting.jsr223.KotlinScriptExecutor
All Implemented Interfaces:
ScriptExecutor

public class KotlinScriptExecutor
extends AbstractScriptExecutor
An AbstractScriptExecutor for the Kotlin scripts support. Uses KotlinJsr223JvmLocalScriptEngineFactory directly since there is no META-INF/services/javax.script.ScriptEngineFactory file in CLASSPATH. Also sets an idea.use.native.fs.for.win system property to false to disable a native engine discovery for Windows: bay be resolved in the future Kotlin versions.
Since:
5.2
  • Field Summary

    Fields inherited from class org.springframework.integration.scripting.jsr223.AbstractScriptExecutor

    logger
  • Constructor Summary

    Constructors 
    Constructor Description
    KotlinScriptExecutor()  
  • Method Summary

    Modifier and Type Method Description
    protected java.lang.Object postProcess​(java.lang.Object result, javax.script.ScriptEngine scriptEngine, java.lang.String script, javax.script.Bindings bindings)
    Subclasses may implement this to provide any special handling required

    Methods inherited from class org.springframework.integration.scripting.jsr223.AbstractScriptExecutor

    executeScript, getScriptEngine

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.integration.scripting.ScriptExecutor

    executeScript
  • Constructor Details

  • Method Details

    • postProcess

      protected java.lang.Object postProcess​(java.lang.Object result, javax.script.ScriptEngine scriptEngine, java.lang.String script, javax.script.Bindings bindings)
      Description copied from class: AbstractScriptExecutor
      Subclasses may implement this to provide any special handling required
      Specified by:
      postProcess in class AbstractScriptExecutor
      Parameters:
      result - the result.
      scriptEngine - the engine.
      script - the script.
      bindings - the bindings.
      Returns:
      modified result