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.StringgetScriptAsString()booleanisModified()java.lang.StringsuggestedClassName()java.lang.StringtoString()
-
Constructor Details
-
RefreshableResourceScriptSource
public RefreshableResourceScriptSource(org.springframework.core.io.Resource resource, long refreshDelay)
-
-
Method Details
-
getScriptAsString
public java.lang.String getScriptAsString() throws java.io.IOException- Specified by:
getScriptAsStringin interfaceorg.springframework.scripting.ScriptSource- Throws:
java.io.IOException
-
suggestedClassName
public java.lang.String suggestedClassName()- Specified by:
suggestedClassNamein interfaceorg.springframework.scripting.ScriptSource
-
isModified
public boolean isModified()- Specified by:
isModifiedin interfaceorg.springframework.scripting.ScriptSource
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-