public class StreamStubMessages extends Object implements MessageVerifier<org.springframework.messaging.Message<?>>
Constructor and Description |
---|
StreamStubMessages(MessageVerifierSender<org.springframework.messaging.Message<?>> sender,
MessageVerifierReceiver<org.springframework.messaging.Message<?>> receiver) |
Modifier and Type | Method and Description |
---|---|
org.springframework.messaging.Message<?> |
receive(String destination,
long timeout,
TimeUnit timeUnit,
YamlContract contract)
Receives the message from the given destination.
|
org.springframework.messaging.Message<?> |
receive(String destination,
YamlContract contract)
Receives the message from the given destination.
|
void |
send(org.springframework.messaging.Message<?> message,
String destination,
YamlContract contract)
Sends the message to the given destination.
|
<T> void |
send(T payload,
Map<String,Object> headers,
String destination,
YamlContract contract)
Sends the given payload with headers, to the given destination.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
send, send
receive, receive
public StreamStubMessages(MessageVerifierSender<org.springframework.messaging.Message<?>> sender, MessageVerifierReceiver<org.springframework.messaging.Message<?>> receiver)
public <T> void send(T payload, Map<String,Object> headers, String destination, YamlContract contract)
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 sentcontract
- contract related to this methodpublic void send(org.springframework.messaging.Message<?> message, String destination, YamlContract contract)
MessageVerifierSender
send
in interface MessageVerifierSender<org.springframework.messaging.Message<?>>
message
- to senddestination
- destination to which the message will be sentcontract
- contract related to this methodpublic org.springframework.messaging.Message<?> receive(String destination, long timeout, TimeUnit timeUnit, YamlContract contract)
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 timeoutcontract
- contract related to this methodpublic org.springframework.messaging.Message<?> receive(String destination, YamlContract contract)
MessageVerifierReceiver
receive
in interface MessageVerifierReceiver<org.springframework.messaging.Message<?>>
destination
- destination from which the message will be receivedcontract
- contract related to this methodCopyright © 2016–2021 Spring. All rights reserved.