Class RefreshableResourceScriptSource

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

public class RefreshableResourceScriptSource
extends java.lang.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 Summary

    Constructors 
    Constructor Description
    RefreshableResourceScriptSource​(org.springframework.core.io.Resource resource, long refreshDelay)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getScriptAsString()  
    boolean isModified()  
    java.lang.String suggestedClassName()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getScriptAsString

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

      public java.lang.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 java.lang.String toString()
      Overrides:
      toString in class java.lang.Object