public class DefaultExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel> extends Object implements ExecutionContextAdapter<M>
ExecutionContextAdapter which adds additional information which is relevant to this
implementation of the extensions-api, even though it's not part of the API itself| Constructor and Description |
|---|
DefaultExecutionContext(org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
Optional<org.mule.runtime.extension.api.runtime.ConfigurationInstance> configuration,
Map<String,Object> parameters,
M componentModel,
Event event,
CursorProviderFactory cursorProviderFactory,
StreamingManager streamingManager,
MuleContext muleContext)
Creates a new instance with the given state
|
| Modifier and Type | Method and Description |
|---|---|
M |
getComponentModel() |
Optional<org.mule.runtime.extension.api.runtime.ConfigurationInstance> |
getConfiguration() |
CursorProviderFactory |
getCursorProviderFactory() |
Event |
getEvent()
Returns the
Event on which an operation is to be executed |
org.mule.runtime.api.meta.model.ExtensionModel |
getExtensionModel() |
MuleContext |
getMuleContext() |
<T> T |
getParameter(String parameterName) |
StreamingManager |
getStreamingManager() |
Optional<TransactionConfig> |
getTransactionConfig() |
<T> T |
getVariable(String key)
Returns the value associated with the
key |
boolean |
hasParameter(String parameterName) |
<T> T |
removeVariable(String key)
Removes the variable value associated with
key. |
Object |
setVariable(String key,
Object value)
Sets a variable of the given
key and value. |
public DefaultExecutionContext(org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
Optional<org.mule.runtime.extension.api.runtime.ConfigurationInstance> configuration,
Map<String,Object> parameters,
M componentModel,
Event event,
CursorProviderFactory cursorProviderFactory,
StreamingManager streamingManager,
MuleContext muleContext)
configuration - the ConfigurationInstance that the operation will useparameters - the parameters that the operation will usecomponentModel - the ComponentModel for the component being executedevent - the current EventcursorProviderFactory - the CursorProviderFactory that was configured on the executed componentstreamingManager - the application's StreamingManagermuleContext - the current MuleContextpublic Optional<org.mule.runtime.extension.api.runtime.ConfigurationInstance> getConfiguration()
getConfiguration in interface org.mule.runtime.extension.api.runtime.operation.ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>public boolean hasParameter(String parameterName)
hasParameter in interface org.mule.runtime.extension.api.runtime.operation.ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>public <T> T getParameter(String parameterName)
getParameter in interface org.mule.runtime.extension.api.runtime.operation.ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>public <T> T getVariable(String key)
keygetVariable in interface ExecutionContextAdapter<M extends org.mule.runtime.api.meta.model.ComponentModel>T - the generic type for the valuekey - the variable's keykey or null if no such variable was registered.public Object setVariable(String key, Object value)
key and value.setVariable in interface ExecutionContextAdapter<M extends org.mule.runtime.api.meta.model.ComponentModel>key - the variable's key. Cannot be nullvalue - the associated value. Cannot be nullkey or null if no such association existed.public <T> T removeVariable(String key)
key.removeVariable in interface ExecutionContextAdapter<M extends org.mule.runtime.api.meta.model.ComponentModel>T - the generic type for the removed valuekey - the variable's key. Cannot be nullkey or null if no such association existedpublic Event getEvent()
Event on which an operation is to be executedgetEvent in interface EventedExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>public org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()
getExtensionModel in interface org.mule.runtime.extension.api.runtime.operation.ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>public M getComponentModel()
getComponentModel in interface org.mule.runtime.extension.api.runtime.operation.ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>public MuleContext getMuleContext()
getMuleContext in interface ExecutionContextAdapter<M extends org.mule.runtime.api.meta.model.ComponentModel>MuleContext on which the operation is being executedpublic CursorProviderFactory getCursorProviderFactory()
getCursorProviderFactory in interface ExecutionContextAdapter<M extends org.mule.runtime.api.meta.model.ComponentModel>CursorProviderFactory configured on the executing componentpublic Optional<TransactionConfig> getTransactionConfig()
getTransactionConfig in interface ExecutionContextAdapter<M extends org.mule.runtime.api.meta.model.ComponentModel>Optional TransactionConfig if the operation is transactionalpublic StreamingManager getStreamingManager()
getStreamingManager in interface ExecutionContextAdapter<M extends org.mule.runtime.api.meta.model.ComponentModel>StreamingManagerCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.