public interface InterceptionEvent
| Modifier and Type | Method and Description |
|---|---|
InterceptionEvent |
addVariable(String key,
Object value)
Add a variable.
|
InterceptionEvent |
addVariable(String key,
Object value,
DataType mediaType)
Add a variable.
|
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
|
<T> TypedValue<T> |
getVariable(String key)
Returns the variable registered under the given
key |
Set<String> |
getVariableNames()
Returns an immutable
Set of variable names. |
InterceptionEvent |
message(Message message)
Set the
Message to construct the target Event with. |
InterceptionEvent |
removeVariable(String key)
Remove a variable.
|
InterceptionEvent |
variables(Map<String,Object> variables)
Set a map of variables.
|
Message getMessage()
Set<String> getVariableNames()
Set of variable names.<T> TypedValue<T> getVariable(String key)
keyT - the type of the variable value.key - the name or key of the variable. This must be non-null.TypedValue containing the variable's value and DataTypeNoSuchElementException - if the flow variable does not exist.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.InterceptionEvent message(Message message)
Message to construct the target Event with.message - the message instance.InterceptionEvent variables(Map<String,Object> variables)
variables - variables to be set.InterceptionEvent addVariable(String key, Object value, DataType mediaType)
key - the key of the variable to add.value - the value of the variable to add. null values are supported.mediaType - additional metadata about the value type.InterceptionEvent 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.InterceptionEvent removeVariable(String key)
key - the variable key.Copyright © 2017 MuleSoft, Inc.. All rights reserved.