Class RefreshableResourceScriptSource

java.lang.Object
org.springframework.integration.scripting.RefreshableResourceScriptSource
All Implemented Interfaces:
org.springframework.scripting.ScriptSource

public class RefreshableResourceScriptSource extends Object implements org.springframework.scripting.ScriptSource
A ScriptSource implementation, which caches a script string and refreshes it from the target file (if modified) according the provided refreshDelay.
Since:
2.0
  • Constructor Details

    • RefreshableResourceScriptSource

      public RefreshableResourceScriptSource(org.springframework.core.io.Resource resource, long refreshDelay)
  • Method Details

    • getScriptAsString

      public String getScriptAsString() throws IOException
      Specified by:
      getScriptAsString in interface org.springframework.scripting.ScriptSource
      Throws:
      IOException
    • suggestedClassName

      public String suggestedClassName()
      Specified by:
      suggestedClassName in interface org.springframework.scripting.ScriptSource
    • isModified

      public boolean isModified()
      Specified by:
      isModified in interface org.springframework.scripting.ScriptSource
    • toString

      public String toString()
      Overrides:
      toString in class Object