public interface InputEvent
InputEvent can be used to trigger the execution of processor chains programmatically.| Modifier and Type | Method and Description |
|---|---|
InputEvent |
addParameter(String key,
Object value)
Add a parameter.
|
InputEvent |
addParameter(String key,
Object value,
DataType dataType)
Add a parameter.
|
InputEvent |
addVariable(String key,
Object value)
Add a variable.
|
InputEvent |
addVariable(String key,
Object value,
DataType dataType)
Add a variable.
|
static InputEvent |
create() |
static InputEvent |
create(Event event) |
static InputEvent |
create(InputEvent inputEvent) |
InputEvent |
error(Error error)
Sets an error related to the produced event.
|
Optional<Error> |
getError()
When a mule component throws an error then an
Error object gets generated with all the data associated to the error. |
Message |
getMessage()
Returns the message payload for this event
|
Map<String,TypedValue<?>> |
getParameters()
Returns the parameters in the event
|
Map<String,TypedValue<?>> |
getProperties()
Returns the properties in the event
|
Map<String,TypedValue<?>> |
getVariables()
Returns the variables in the event
|
InputEvent |
message(Message message)
|
InputEvent |
parameters(Map<String,Object> parameters)
Set a map of parameters to be consumed within a XML connector operation
|
InputEvent |
properties(Map<String,Object> properties)
Set a map of properties to be consumed within a XML connector operation
|
InputEvent |
variables(Map<String,?> variables)
Set a map of variables.
|
static InputEvent create()
InputEventstatic InputEvent create(Event event)
event - an Event to use as source of dataInputEvent with the content of an existent Eventstatic InputEvent create(InputEvent inputEvent)
inputEvent - an InputEvent to use as source of dataInputEvent with the content of an existent InputEventInputEvent message(Message message)
message - the message instance.InputEvent variables(Map<String,?> variables)
variables - variables to be set.InputEvent addVariable(String key, Object value)
key - the key of the variable to add.value - the value of the variable to add. null values are supported.InputEvent addVariable(String key, Object value, DataType dataType)
key - the key of the variable to add.value - the value of the variable to add. null values are supported.dataType - additional metadata about the value type.InputEvent properties(Map<String,Object> properties)
For every module's Event, so that we can guarantee that for each invocation there's a real variable
scoping for them.
properties - properties to be set.parameters(Map)InputEvent parameters(Map<String,Object> parameters)
For every module's Event, so that we can guarantee that for each invocation there's a real variable
scoping for them.
parameters - parameters to be set.properties(Map)InputEvent addParameter(String key, Object value)
key - the key of the parameter to add.value - the value of the variable to add. null values are supported.InputEvent addParameter(String key, Object value, DataType dataType)
key - the key of the parameter to add.value - the value of the parameter to add. null values are supported.dataType - additional metadata about the value type.InputEvent error(Error error)
error - the error associated with the produced eventMap<String,TypedValue<?>> getVariables()
TypedValue containing the variable's names and values.Map<String,TypedValue<?>> getProperties()
TypedValue containing the properties's names and values.Map<String,TypedValue<?>> getParameters()
TypedValue containing the parameter's names and values.Message getMessage()
Optional<Error> getError()
Error object gets generated with all the data associated to the error.
This field will only contain a value within the error handler defined to handle errors. After the error handler is executed
the event error field will be cleared. If another flow is called from within the error handler the flow will still have
access to the error field.
To avoid losing the error field after the error handler the user can define a variable pointing to the error field.Copyright © 2017 MuleSoft, Inc.. All rights reserved.