@Component public class CamelStubMessages extends Object implements MessageVerifier<org.apache.camel.Message>
Constructor and Description |
---|
CamelStubMessages(org.apache.camel.CamelContext context) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Message |
receive(String destination)
Receives the message from the given destination.
|
org.apache.camel.Message |
receive(String destination,
long timeout,
TimeUnit timeUnit)
Receives the message from the given destination.
|
void |
send(org.apache.camel.Message message,
String destination)
Sends the message to the given destination.
|
<T> void |
send(T payload,
Map<String,Object> headers,
String destination)
Sends the given payload with headers, to the given destination.
|
@Autowired public CamelStubMessages(org.apache.camel.CamelContext context)
public void send(org.apache.camel.Message message, String destination)
MessageVerifier
send
in interface MessageVerifier<org.apache.camel.Message>
message
- to senddestination
- destination to which the message will be sentpublic <T> void send(T payload, Map<String,Object> headers, String destination)
MessageVerifier
send
in interface MessageVerifier<org.apache.camel.Message>
T
- payload typepayload
- payload to sendheaders
- headers to senddestination
- destination to which the message will be sentpublic org.apache.camel.Message receive(String destination, long timeout, TimeUnit timeUnit)
MessageVerifier
receive
in interface MessageVerifier<org.apache.camel.Message>
destination
- destination from which the message will be receivedtimeout
- timeout to wait for the messagetimeUnit
- param to define the unit of timeoutpublic org.apache.camel.Message receive(String destination)
MessageVerifier
receive
in interface MessageVerifier<org.apache.camel.Message>
destination
- destination from which the message will be receivedCopyright © 2016–2019 Spring. All rights reserved.