Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.module.scripting.component
Class Scriptable

    java.lang.Object
      org.mule.module.scripting.component.Scriptable

All Implemented Interfaces:
  MuleContextAware, Initialisable

    public class Scriptable

extends Object
implements Initialisable, MuleContextAware

A JSR 223 Script service. Allows any JSR 223 compliant script engines such as JavaScript, Groovy or Rhino to be embedded as Mule components.

Field Summary
`protected Log` | `logger`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Constructor Summary
`Scriptable()`
`Scriptable(MuleContext muleContext)`

Method Summary
`protected javax.script.ScriptEngine` | `createScriptEngineByExtension(String ext)`
`protected javax.script.ScriptEngine` | `createScriptEngineByName(String name)`
`protected javax.script.CompiledScript` | `getCompiledScript()`
`Properties` | `getProperties()`
`javax.script.ScriptEngine` | `getScriptEngine()`
`String` | `getScriptEngineName()`
`String` | `getScriptFile()`
`String` | `getScriptText()`
`void` | `initialise()` Method used to perform any initialisation work.
`protected String` | `listAvailableEngines()`
`void` | `populateBindings(javax.script.Bindings bindings, MuleEvent event)`
`void` | `populateBindings(javax.script.Bindings bindings, MuleMessage message)`
`void` | `populateBindings(javax.script.Bindings bindings, Object payload)`
`void` | `populateDefaultBindings(javax.script.Bindings bindings)`
`Object` | `runScript(javax.script.Bindings bindings)`
`protected void` | `setCompiledScript(javax.script.CompiledScript compiledScript)`
`void` | `setMuleContext(MuleContext context)`
`void` | `setProperties(Properties properties)`
`protected void` | `setScriptEngine(javax.script.ScriptEngine scriptEngine)`
`void` | `setScriptEngineName(String scriptEngineName)`
`void` | `setScriptFile(String scriptFile)`
`void` | `setScriptText(String scriptText)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected transient Log logger

Constructor Detail

### Scriptable

    public Scriptable()

### Scriptable

    public Scriptable(MuleContext muleContext)

Method Detail

### setMuleContext

    public void setMuleContext(MuleContext context)

  Specified by:
    `setMuleContext` in interface `MuleContextAware`

### initialise

    public void initialise()
                    throws InitialisationException

  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:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### populateDefaultBindings

    public void populateDefaultBindings(javax.script.Bindings bindings)

### populateBindings

    public void populateBindings(javax.script.Bindings bindings,
                                 Object payload)

### populateBindings

    public void populateBindings(javax.script.Bindings bindings,
                                 MuleMessage message)

### populateBindings

    public void populateBindings(javax.script.Bindings bindings,
                                 MuleEvent event)

### runScript

    public Object runScript(javax.script.Bindings bindings)
                     throws javax.script.ScriptException

  Throws:
    `javax.script.ScriptException`

### createScriptEngineByName

    protected javax.script.ScriptEngine createScriptEngineByName(String name)

### createScriptEngineByExtension

    protected javax.script.ScriptEngine createScriptEngineByExtension(String ext)

### listAvailableEngines

    protected String listAvailableEngines()

### 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()

### getProperties

    public Properties getProperties()

### setProperties

    public void setProperties(Properties properties)

### getScriptEngine

    public javax.script.ScriptEngine getScriptEngine()

### setScriptEngine

    protected void setScriptEngine(javax.script.ScriptEngine scriptEngine)

### getCompiledScript

    protected javax.script.CompiledScript getCompiledScript()

### setCompiledScript

    protected void setCompiledScript(javax.script.CompiledScript compiledScript)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.