public class LocalRunner extends Object implements DataWeaveRunner
DataWeaveRunner that executes an script locally using DataWeave API.| Modifier and Type | Field and Description |
|---|---|
static org.mule.runtime.api.metadata.TypedValue |
EMPTY_VARS |
static org.mule.runtime.api.metadata.TypedValue |
NULL_TYPED_VALUE |
| 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 static final org.mule.runtime.api.metadata.TypedValue EMPTY_VARS
public static final org.mule.runtime.api.metadata.TypedValue NULL_TYPED_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 © 2019 MuleSoft, Inc.. All rights reserved.