public class LocalRunner extends Object implements DataWeaveRunner
DataWeaveRunner that executes an script locally using DataWeave API.| Constructor and Description |
|---|
LocalRunner(org.mule.runtime.api.util.LazyValue<ClassLoader> executionClassLoader,
org.mule.runtime.api.util.LazyValue<org.mule.runtime.api.component.ConfigurationProperties> configurationProperties)
Creates an instance of the runner with the given
ClassLoader. |
| Modifier and Type | Method and Description |
|---|---|
protected org.mule.runtime.api.metadata.TypedValue<?> |
asTypedValue(org.mule.tooling.event.model.TypedValueModel restTypedValue) |
org.mule.tooling.client.api.dataweave.DataWeavePreviewResponse |
execute(org.mule.tooling.client.api.dataweave.DataWeavePreviewRequest parameters)
Run DataWeave script with given parameters.
|
protected String |
manageCursorStream(org.mule.runtime.api.metadata.TypedValue<org.mule.runtime.api.streaming.bytes.CursorStreamProvider> result) |
protected String |
serializeObject(Object value) |
public LocalRunner(org.mule.runtime.api.util.LazyValue<ClassLoader> executionClassLoader, org.mule.runtime.api.util.LazyValue<org.mule.runtime.api.component.ConfigurationProperties> configurationProperties)
ClassLoader.executionClassLoader - the ClassLoader to be used when running DW scripts.public org.mule.tooling.client.api.dataweave.DataWeavePreviewResponse execute(org.mule.tooling.client.api.dataweave.DataWeavePreviewRequest parameters)
execute in interface DataWeaveRunnerparameters - required for running dataWeave script.DataWeavePreviewResponse with execution result.protected String manageCursorStream(org.mule.runtime.api.metadata.TypedValue<org.mule.runtime.api.streaming.bytes.CursorStreamProvider> result)
protected org.mule.runtime.api.metadata.TypedValue<?> asTypedValue(org.mule.tooling.event.model.TypedValueModel restTypedValue)
throws IOException
IOExceptionCopyright © 2018 MuleSoft, Inc.. All rights reserved.