java.lang.Object
org.springframework.integration.scripting.dsl.Scripts

public final class Scripts extends Object
The factory for Dynamic Language Scripts (Groovy, Ruby, Python, JavaScript etc.).
Since:
5.0
Author:
Artem Bilan
  • Method Details

    • processor

      public static ScriptSpec processor(Resource scriptResource)
      The factory method to produce ScriptSpec based on the Resource. The Resource must represent the real file and can be injected like:
        @Value("com/my/project/scripts/FilterScript.groovy")
        private Resource filterScript;
       
      Parameters:
      scriptResource - the script file Resource
      Returns:
      the ScriptSpec instance
    • processor

      public static ScriptSpec processor(String scriptLocation)
      The factory method to produce ScriptSpec based on the script file location.
      Parameters:
      scriptLocation - the path to the script file. file:, ftp:, s3: etc. The classpath: can be omitted.
      Returns:
      the ScriptSpec instance
    • messageSource

      public static ScriptMessageSourceSpec messageSource(Resource scriptResource)
      Factory for the ScriptMessageSourceSpec based on the Resource. The Resource must represent the real file and can be injected like:
        @Value("com/my/project/scripts/FilterScript.groovy")
        private Resource filterScript;
       
      Parameters:
      scriptResource - the script Resource
      Returns:
      the ScriptMessageSourceSpec
    • messageSource

      public static ScriptMessageSourceSpec messageSource(String scriptLocation)
      Factory for the ScriptMessageSourceSpec based on the script location.
      Parameters:
      scriptLocation - the path to the script file. file:, ftp:, s3: etc. The classpath: can be omitted.
      Returns:
      the ScriptMessageSourceSpec