org.mule.components.script
Class AbstractScriptComponent

java.lang.Object
  extended byorg.mule.components.script.AbstractScriptComponent
All Implemented Interfaces:
Callable, Disposable, FileListener, Initialisable, Lifecycle, Startable, Stoppable, UMODescriptorAware
Direct Known Subclasses:
GroovyComponent

public abstract class AbstractScriptComponent
extends java.lang.Object
implements Initialisable, Lifecycle, UMODescriptorAware, FileListener, Callable

AbstractScriptComponent is a compoennt that can execute scripts as components in Mule. This component also supports reloading if the script file changes (providing the file is on the file system)

Version:
$Revision: 1.1.1.1 $
Author:
Ross Mason

Field Summary
protected  UMODescriptor descriptor
           
protected  Log logger
          logger used by this class
 
Constructor Summary
AbstractScriptComponent()
           
 
Method Summary
 void dispose()
           
protected abstract  java.lang.String getDefaultFileExtension()
           
 java.lang.String getScript()
           
 void initialise()
           
 boolean isAutoReload()
           
protected abstract  void loadInterpreter(java.lang.String script)
           
 void setAutoReload(boolean autoReload)
           
 void setDescriptor(UMODescriptor descriptor)
           
 void setScript(java.lang.String script)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.util.monitor.FileListener
fileChanged
 
Methods inherited from interface org.mule.umo.lifecycle.Callable
onCall
 

Field Detail

logger

protected transient Log logger
logger used by this class


descriptor

protected UMODescriptor descriptor
Constructor Detail

AbstractScriptComponent

public AbstractScriptComponent()
Method Detail

setDescriptor

public void setDescriptor(UMODescriptor descriptor)
Specified by:
setDescriptor in interface UMODescriptorAware

initialise

public void initialise()
                throws InitialisationException
Specified by:
initialise in interface Initialisable
Throws:
InitialisationException

getScript

public java.lang.String getScript()

setScript

public void setScript(java.lang.String script)

isAutoReload

public boolean isAutoReload()

setAutoReload

public void setAutoReload(boolean autoReload)

start

public void start()
           throws UMOException
Specified by:
start in interface Startable
Throws:
UMOException

stop

public void stop()
          throws UMOException
Specified by:
stop in interface Stoppable
Throws:
UMOException

dispose

public void dispose()
             throws UMOException
Specified by:
dispose in interface Disposable
Throws:
UMOException

loadInterpreter

protected abstract void loadInterpreter(java.lang.String script)
                                 throws InitialisationException
Throws:
InitialisationException

getDefaultFileExtension

protected abstract java.lang.String getDefaultFileExtension()


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.