org.mule.extras.groovy
Class GroovyComponent
java.lang.Object
org.mule.components.script.AbstractScriptComponent
org.mule.extras.groovy.GroovyComponent
- All Implemented Interfaces:
- Callable, Disposable, FileListener, Initialisable, Lifecycle, Startable, Stoppable, UMODescriptorAware
- public class GroovyComponent
- extends AbstractScriptComponent
GroovyComponent
allows a grooy object ot managed as a Mule
component.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- Ross Mason
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_METHOD_NAME
public static final java.lang.String DEFAULT_METHOD_NAME
- See Also:
- Constant Field Values
GroovyComponent
public GroovyComponent()
loadInterpreter
protected void loadInterpreter(java.lang.String script)
throws InitialisationException
- Loads the script for this component
- Specified by:
loadInterpreter
in class AbstractScriptComponent
- Parameters:
script
- the script file location
- Throws:
InitialisationException
- if anything fails while starting up
getDefaultFileExtension
protected java.lang.String getDefaultFileExtension()
- Specified by:
getDefaultFileExtension
in class AbstractScriptComponent
fileChanged
public void fileChanged(java.io.File file)
throws java.io.IOException
- Called when one of the monitored files are created, deleted
or modified.
- Parameters:
file
- File which has been changed.
- Throws:
java.io.IOException
getMethodName
public java.lang.String getMethodName()
setMethodName
public void setMethodName(java.lang.String methodName)
onCall
public java.lang.Object onCall(UMOEventContext context)
throws java.lang.Exception
- Passes the context to the listener
- Parameters:
context
- the context ot process
- Returns:
- Object this object can be anything. When the
UMOLifecycleAdapter
for
the components receives this object it will first see if the Object is an
UMOEvent
if not and the Object is not null a new context will be created using
the returned object as the payload. This new context will then get published to the configured
outbound endpoint if-
- One has been configured for the UMO.
- the
setStopFurtherProcessing(true)
wasn't called on the previous context.
- Throws:
java.lang.Exception
- if the context fails to process properly. If exceptions aren't handled by the implementation
they will be handled by the exceptionStrategy associated with the components
Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.