org.mule.components.script.jsr223
Class Scriptable
java.lang.Object
org.mule.components.script.jsr223.Scriptable
- All Implemented Interfaces:
- Initialisable
- Direct Known Subclasses:
- ScriptComponent, ScriptConfigurationBuilder
- public class Scriptable
- extends Object
- implements Initialisable
A JSR 223 Script component. Allows any JSR 223 compliant script engines such as
javaScript, Groovy or Rhino to be embedded as Mule components.
|
Field Summary |
protected Log |
logger
logger used by this class |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected transient Log logger
- logger used by this class
Scriptable
public Scriptable()
initialise
public void initialise()
throws InitialisationException,
RecoverableException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise in interface Initialisable
- Throws:
RecoverableException - if an error occurs that can be recovered from
InitialisationException - if a fatal error occurs causing the Mule
instance to shutdown
getScriptEngine
public ScriptEngine getScriptEngine()
setScriptEngine
public void setScriptEngine(ScriptEngine scriptEngine)
getCompiledScript
public CompiledScript getCompiledScript()
setCompiledScript
public void setCompiledScript(CompiledScript compiledScript)
getScriptText
public String getScriptText()
setScriptText
public void setScriptText(String scriptText)
getScriptFile
public String getScriptFile()
setScriptFile
public void setScriptFile(String scriptFile)
setScriptEngineName
public void setScriptEngineName(String scriptEngineName)
getScriptEngineName
public String getScriptEngineName()
compileScript
protected CompiledScript compileScript(Compilable compilable,
Reader scriptReader)
throws ScriptException
- Throws:
ScriptException
compileScript
protected CompiledScript compileScript(Reader scriptReader)
throws ScriptException
- Throws:
ScriptException
evaluteScript
protected Object evaluteScript(Namespace namespace)
throws ScriptException
- Throws:
ScriptException
runScript
public Object runScript(Namespace namespace)
throws ScriptException
- Throws:
ScriptException
runScript
public Object runScript(CompiledScript compiledScript,
Namespace namespace)
throws ScriptException
- Throws:
ScriptException
createScriptEngine
protected ScriptEngine createScriptEngine()
Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.