public class TestEventBuilder extends Object
| Constructor and Description |
|---|
TestEventBuilder() |
| Modifier and Type | Method and Description |
|---|---|
CoreEvent |
build(FlowConstruct flow)
Produces an event with the specified configuration.
|
TestEventBuilder |
setExternalCompletionCallback(org.reactivestreams.Publisher<Void> externalCompletionCallback) |
TestEventBuilder |
spyObjects()
Will spy the built
Message and CoreEvent. |
TestEventBuilder |
withAttributes(Object attributes)
Sets the
Message.getAttributes() value of the produced message |
TestEventBuilder |
withCorrelation(GroupCorrelation groupCorrelation)
Configures the product event to have the provided
correlation. |
TestEventBuilder |
withInboundAttachment(String key,
DataHandler value)
Deprecated.
Transport infrastructure is deprecated.
|
TestEventBuilder |
withInboundProperties(Map<String,Serializable> properties)
Deprecated.
Transport infrastructure is deprecated. Use
Message.getAttributes() instead. |
TestEventBuilder |
withInboundProperty(String key,
Serializable value)
Deprecated.
Transport infrastructure is deprecated. Use
Message.getAttributes() instead. |
TestEventBuilder |
withMediaType(org.mule.runtime.api.metadata.MediaType mediaType)
Prepares the given data to be sent as the mediaType of the payload of the
CoreEvent to the configured flow. |
TestEventBuilder |
withOutboundProperty(String key,
Serializable value)
Deprecated.
Transport infrastructure is deprecated. Use
Message.getAttributes() instead. |
TestEventBuilder |
withPayload(Object payload)
Prepares the given data to be sent as the payload of the product.
|
TestEventBuilder |
withReplyToHandler(ReplyToHandler replyToHandler)
Deprecated.
TODO MULE-10739 Move ReplyToHandler to compatibility module.
|
TestEventBuilder |
withSessionProperty(String key,
Object value)
Deprecated.
Transport infrastructure is deprecated.
|
TestEventBuilder |
withSourceCorrelationId(String sourceCorrelationId)
Configures the product event to have the provided
sourceCorrelationId. |
TestEventBuilder |
withVariable(String key,
Object value)
Prepares a flow variable with the given key and value to be set in the product.
|
TestEventBuilder |
withVariable(String key,
Object value,
org.mule.runtime.api.metadata.DataType dataType)
Prepares a flow variable with the given key and value to be set in the product.
|
public TestEventBuilder withPayload(Object payload)
payload - the payload to use in the messageTestEventBuilderpublic TestEventBuilder withMediaType(org.mule.runtime.api.metadata.MediaType mediaType)
CoreEvent to the configured flow.mediaType - the mediaType to use in the messageFlowRunnerpublic TestEventBuilder withAttributes(Object attributes)
Message.getAttributes() value of the produced messageattributes - the attributes object for the produced MessageTestEventBuilder@Deprecated public TestEventBuilder withInboundProperty(String key, Serializable value)
Message.getAttributes() instead.key - the key of the inbound property to addvalue - the value of the inbound property to addTestEventBuilder@Deprecated public TestEventBuilder withInboundProperties(Map<String,Serializable> properties)
Message.getAttributes() instead.properties - the inbound properties to addTestEventBuilder@Deprecated public TestEventBuilder withOutboundProperty(String key, Serializable value)
Message.getAttributes() instead.key - the key of the outbound property to addvalue - the value of the outbound property to addTestEventBuilder@Deprecated public TestEventBuilder withInboundAttachment(String key, DataHandler value)
key - the key of the attachment to addvalue - the DataHandler for the attachment to addTestEventBuilder@Deprecated public TestEventBuilder withSessionProperty(String key, Object value)
key - the key of the session property to addvalue - the value of the session property to addTestEventBuilderpublic TestEventBuilder withSourceCorrelationId(String sourceCorrelationId)
sourceCorrelationId. See Event.getCorrelationId().TestEventBuilderpublic TestEventBuilder withCorrelation(GroupCorrelation groupCorrelation)
correlation. See CoreEvent.getGroupCorrelation().TestEventBuilderpublic TestEventBuilder withVariable(String key, Object value)
key - the key of the flow variable to putvalue - the value of the flow variable to putTestEventBuilderpublic TestEventBuilder withVariable(String key, Object value, org.mule.runtime.api.metadata.DataType dataType)
key - the key of the flow variable to putvalue - the value of the flow variable to putdataType - the data type of the variableTestEventBuilder@Deprecated public TestEventBuilder withReplyToHandler(ReplyToHandler replyToHandler)
ReplyToHandler.TestEventBuilderpublic TestEventBuilder spyObjects()
TestEventBuilderpublic TestEventBuilder setExternalCompletionCallback(org.reactivestreams.Publisher<Void> externalCompletionCallback)
public CoreEvent build(FlowConstruct flow)
flow - the recipient for the event to be built.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.