public class DefaultInputEvent extends Object implements InputEvent
InputEvent.| Constructor and Description |
|---|
DefaultInputEvent() |
DefaultInputEvent(Event event) |
DefaultInputEvent(InputEvent inputEvent) |
| 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.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, createpublic DefaultInputEvent()
public DefaultInputEvent(Event event)
public DefaultInputEvent(InputEvent inputEvent)
public InputEvent message(Message message)
InputEventmessage in interface InputEventmessage - the message instance.public InputEvent variables(Map<String,?> variables)
InputEventvariables in interface InputEventvariables - variables to be set.public InputEvent addVariable(String key, Object value)
InputEventaddVariable in interface InputEventkey - the key of the variable to add.value - the value of the variable to add. null values are supported.public InputEvent addVariable(String key, Object value, DataType dataType)
InputEventaddVariable in interface InputEventkey - 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.public InputEvent properties(Map<String,Object> properties)
InputEvent
For every module's Event, so that we can guarantee that for each invocation there's a real variable
scoping for them.
properties in interface InputEventproperties - properties to be set.InputEvent.parameters(Map)public InputEvent parameters(Map<String,Object> parameters)
InputEvent
For every module's Event, so that we can guarantee that for each invocation there's a real variable
scoping for them.
parameters in interface InputEventparameters - parameters to be set.InputEvent.properties(Map)public InputEvent addParameter(String key, Object value)
InputEventaddParameter in interface InputEventkey - the key of the parameter to add.value - the value of the variable to add. null values are supported.public InputEvent addParameter(String key, Object value, DataType dataType)
InputEventaddParameter in interface InputEventkey - 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.public InputEvent error(Error error)
InputEventerror in interface InputEventerror - the error associated with the produced eventpublic Map<String,TypedValue<?>> getVariables()
InputEventgetVariables in interface InputEventTypedValue containing the variable's names and values.public Map<String,TypedValue<?>> getParameters()
InputEventgetParameters in interface InputEventTypedValue containing the parameter's names and values.public Map<String,TypedValue<?>> getProperties()
InputEventgetProperties in interface InputEventTypedValue containing the properties's names and values.public Message getMessage()
InputEventgetMessage in interface InputEventpublic Optional<Error> getError()
InputEventError 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.getError in interface InputEventCopyright © 2017 MuleSoft, Inc.. All rights reserved.