Interface ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>
- Type Parameters:
M- the generic type of of the model which represents the component beign executed
@NoImplement
public interface ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>
Provides context information about the execution of a modeled component
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns theConfigurationInstancefor the operation being executed.org.mule.runtime.api.meta.model.ExtensionModel<T> TgetParameter(String parameterName) Returns the value associated to a parameter of nameparameterName<T> TgetParameterOrDefault(String parameterName, T defaultValue) Returns the value associated to a parameter of nameparameterNameordefaultValueif such parameter is not present.Returns an immutable map containing all the parameters associated with this execution.booleanhasParameter(String parameterName) Returns whether parameter of nameparameterNamehas a value associated to it.
-
Method Details
-
hasParameter
Returns whether parameter of nameparameterNamehas a value associated to it.- Parameters:
parameterName- the name of aParameterModelof theComponentModelbeing executed- Returns:
trueif the parameter is present.
-
getParameter
Returns the value associated to a parameter of nameparameterName- Type Parameters:
T- the returned value's generic type- Parameters:
parameterName- the name of aParameterModelof theComponentModelbeing executed- Returns:
- the parameter's value or
null. Notice thatnullmeans that the parameter has been resolved to that value. - Throws:
NoSuchElementException- if the parameter is not present.
-
getParameterOrDefault
Returns the value associated to a parameter of nameparameterNameordefaultValueif such parameter is not present.- Type Parameters:
T- the returned value's generic type- Parameters:
parameterName- the name of aParameterModelof theComponentModelbeing executeddefaultValue- the default value to return in case the parameter is not present- Returns:
- Since:
- 1.3.0
-
getParameters
Returns an immutable map containing all the parameters associated with this execution. The keys are the parameter names and the values are... well, the values.It is guaranteed that whatever value returned in this map will be the exact same as invoking
getParameter(String)with the same key, no matter how many times invoked nor in which order.- Returns:
- an immutable
Mapwith all the parameters
-
getConfiguration
Optional<ConfigurationInstance> getConfiguration()Returns theConfigurationInstancefor the operation being executed.- Returns:
- a
ConfigurationInstanceconsistent with a correspondingConfigurationModel
-
getExtensionModel
org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()- Returns:
- the
ExtensionModelwhich owns thegetComponentModel()
-
getComponentModel
M getComponentModel()- Returns:
- the model for the component being executed
-