public class DefaultEventBuilder extends Object implements Event.Builder
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultEventBuilder.EventImplementation
EventImplementation represents any data event occurring in the Mule environment. |
| Constructor and Description |
|---|
DefaultEventBuilder(Event event) |
DefaultEventBuilder(EventContext messageContext) |
DefaultEventBuilder(EventContext messageContext,
Event event) |
| Modifier and Type | Method and Description |
|---|---|
Event.Builder |
addVariable(String key,
Object value)
Add a variable.
|
Event.Builder |
addVariable(String key,
Object value,
org.mule.runtime.api.metadata.DataType dataType)
Add a variable.
|
Event |
build()
Build a new
Event based on the state configured in the Event.Builder. |
Event.Builder |
correlationId(String correlationId)
Set correlationId overriding the correlationId from
EventContext.getCorrelationId() that came from the source
system or that was configured in the connector source. |
Event.Builder |
disableNotifications()
Disables the firing of notifications when processing the produced event.
|
Event.Builder |
error(org.mule.runtime.api.message.Error error)
Sets an error related to the produced event.
|
Event.Builder |
flow(FlowConstruct flow) |
Event.Builder |
groupCorrelation(GroupCorrelation correlation)
Sets the group correlation information to the produced event.
|
Event.Builder |
message(org.mule.runtime.api.message.Message message)
Set the
Message to construct Event with. |
Event.Builder |
parameters(Map<String,Object> parameters)
Set a map of parameters to be consumed within a
ModuleOperationMessageProcessorChainBuilder.ModuleOperationProcessorChain. |
Event.Builder |
properties(Map<String,Object> properties)
Set a map of properties to be consumed within a
ModuleOperationMessageProcessorChainBuilder.ModuleOperationProcessorChain. |
Event.Builder |
removeParameter(String key)
Remove a parameter.
|
Event.Builder |
removeVariable(String key)
Remove a variable.
|
Event.Builder |
replyToDestination(Object replyToDestination) |
Event.Builder |
replyToHandler(ReplyToHandler replyToHandler) |
Event.Builder |
session(MuleSession session) |
Event.Builder |
variables(Map<String,Object> flowVariables)
Set a map of variables.
|
public DefaultEventBuilder(EventContext messageContext)
public DefaultEventBuilder(Event event)
public DefaultEventBuilder(EventContext messageContext, Event event)
public Event.Builder message(org.mule.runtime.api.message.Message message)
Event.BuilderMessage to construct Event with.message in interface Event.Buildermessage - the message instance.public Event.Builder variables(Map<String,Object> flowVariables)
Event.Buildervariables in interface Event.BuilderflowVariables - variables to be set.public Event.Builder addVariable(String key, Object value)
Event.BuilderaddVariable in interface Event.Builderkey - the key of the variable to add.value - the value of the variable to add. null values are supported.public Event.Builder addVariable(String key, Object value, org.mule.runtime.api.metadata.DataType dataType)
Event.BuilderaddVariable in interface Event.Builderkey - 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 Event.Builder removeVariable(String key)
Event.BuilderremoveVariable in interface Event.Builderkey - the variable key.public Event.Builder properties(Map<String,Object> properties)
Event.BuilderModuleOperationMessageProcessorChainBuilder.ModuleOperationProcessorChain.
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 Event.Builderproperties - properties to be set.Event.Builder.parameters(Map)public Event.Builder parameters(Map<String,Object> parameters)
Event.BuilderModuleOperationMessageProcessorChainBuilder.ModuleOperationProcessorChain.
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 Event.Builderparameters - parameters to be set.Event.Builder.properties(Map)public Event.Builder removeParameter(String key)
Event.BuilderremoveParameter in interface Event.Builderkey - the parameter key.Event.Builder.parameters(Map)public Event.Builder correlationId(String correlationId)
Event.BuilderEventContext.getCorrelationId() that came from the source
system or that was configured in the connector source. This is only used to support transports and should not be used
otherwise.correlationId in interface Event.BuildercorrelationId - to override existing correlationIdpublic Event.Builder groupCorrelation(GroupCorrelation correlation)
Event.BuildergroupCorrelation in interface Event.Buildercorrelation - the object containing the group correlation information to set on the produced eventpublic Event.Builder error(org.mule.runtime.api.message.Error error)
Event.Buildererror in interface Event.Buildererror - the error associated with the produced eventpublic Event.Builder flow(FlowConstruct flow)
flow in interface Event.Builderpublic Event.Builder replyToHandler(ReplyToHandler replyToHandler)
replyToHandler in interface Event.Builderpublic Event.Builder replyToDestination(Object replyToDestination)
replyToDestination in interface Event.Builderpublic Event.Builder session(MuleSession session)
session in interface Event.Builderpublic Event.Builder disableNotifications()
Event.BuilderdisableNotifications in interface Event.Builderpublic Event build()
Event.BuilderEvent based on the state configured in the Event.Builder.build in interface Event.BuilderEvent instance.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.