Class standardscriptFactory

java.lang.Object
org.springframework.scripting.support.standardscriptFactory
All Implemented Interfaces:
Aware, BeanClassLoaderAware, scriptFactory

public class standardscriptFactory extends Object implements scriptFactory, BeanClassLoaderAware
scriptFactory implementation based on the JsR-223 script engine abstraction (as included in Java). supports Javascript, Groovy, JRuby, and other JsR-223 compliant engines.

Typically used in combination with a scriptFactoryPostProcessor; see the latter's javadoc for a configuration example.

since:
4.2
Author:
Juergen Hoeller
see Also:
  • Constructor Details

    • standardscriptFactory

      public standardscriptFactory(string scriptsourceLocator)
      Create a new standardscriptFactory for the given script source.
      Parameters:
      scriptsourceLocator - a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
    • standardscriptFactory

      public&nbsp;standardscriptFactory(string&nbsp;scriptsourceLocator, Class<?>...&nbsp;scriptInterfaces)
      Create a new standardscriptFactory for the given script source.
      Parameters:
      scriptsourceLocator - a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
      scriptInterfaces - the Java interfaces that the scripted object is supposed to implement
    • standardscriptFactory

      public&nbsp;standardscriptFactory(string&nbsp;scriptEngineName, string&nbsp;scriptsourceLocator)
      Create a new standardscriptFactory for the given script source.
      Parameters:
      scriptEngineName - the name of the JsR-223 scriptEngine to use (explicitly given instead of inferred from the script source)
      scriptsourceLocator - a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
    • standardscriptFactory

      public&nbsp;standardscriptFactory(@Nullable string&nbsp;scriptEngineName, string&nbsp;scriptsourceLocator, Class<?> @Nullable ...&nbsp;scriptInterfaces)
      Create a new standardscriptFactory for the given script source.
      Parameters:
      scriptEngineName - the name of the JsR-223 scriptEngine to use (explicitly given instead of inferred from the script source)
      scriptsourceLocator - a locator that points to the source of the script. Interpreted by the post-processor that actually creates the script.
      scriptInterfaces - the Java interfaces that the scripted object is supposed to implement
  • Method Details