public class SpringIntegrationStubMessages extends Object implements MessageVerifier<org.springframework.messaging.Message<?>>
Constructor and Description |
---|
SpringIntegrationStubMessages(org.springframework.context.ApplicationContext context) |
Modifier and Type | Method and Description |
---|---|
org.springframework.messaging.Message<?> |
receive(String destination)
Receives the message from the given destination.
|
org.springframework.messaging.Message<?> |
receive(String destination,
long timeout,
TimeUnit timeUnit)
Receives the message from the given destination.
|
void |
send(org.springframework.messaging.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 SpringIntegrationStubMessages(org.springframework.context.ApplicationContext context)
public <T> void send(T payload, Map<String,Object> headers, String destination)
MessageVerifierSender
send
in interface MessageVerifierSender<org.springframework.messaging.Message<?>>
T
- payload typepayload
- payload to sendheaders
- headers to senddestination
- destination to which the message will be sentpublic void send(org.springframework.messaging.Message<?> message, String destination)
MessageVerifierSender
send
in interface MessageVerifierSender<org.springframework.messaging.Message<?>>
message
- to senddestination
- destination to which the message will be sentpublic org.springframework.messaging.Message<?> receive(String destination, long timeout, TimeUnit timeUnit)
MessageVerifierReceiver
receive
in interface MessageVerifierReceiver<org.springframework.messaging.Message<?>>
destination
- destination from which the message will be receivedtimeout
- timeout to wait for the messagetimeUnit
- param to define the unit of timeoutpublic org.springframework.messaging.Message<?> receive(String destination)
MessageVerifierReceiver
receive
in interface MessageVerifierReceiver<org.springframework.messaging.Message<?>>
destination
- destination from which the message will be receivedCopyright © 2016–2021 Spring. All rights reserved.