Class OutputDestination
java.lang.Object
org.springframework.cloud.stream.binder.test.OutputDestination
Implementation of binder endpoint that represents the target destination (e.g.,
destination which receives messages sent to Processor.OUTPUT)
You can interact with it by calling
You can interact with it by calling
receive() operation.- Author:
- Oleg Zhurakousky
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Will clear all output destinations.booleanWill clear output destination with specified name.org.springframework.messaging.Message<byte[]>receive()Allows to accessMessages received by thisOutputDestination.org.springframework.messaging.Message<byte[]>receive(long timeout) org.springframework.messaging.Message<byte[]>receive(long timeout, int bindingIndex) Deprecated.org.springframework.messaging.Message<byte[]>
-
Constructor Details
-
OutputDestination
public OutputDestination()
-
-
Method Details
-
receive
-
clear
public void clear()Will clear all output destinations.- Since:
- 3.0.6
-
clear
Will clear output destination with specified name.- Parameters:
destinationName- the name of the output destination to be cleared.- Returns:
- true if attempt to clear specific destination is successful otherwise false.
- Since:
- 3.0.6
-
receive
@Deprecated public org.springframework.messaging.Message<byte[]> receive(long timeout, int bindingIndex) Deprecated.since 3.0.2 in favor ofreceive(long, String)where you should use the actual binding name (e.g., "foo-in-0")Allows to accessMessages received by thisOutputDestination.- Parameters:
timeout- how long to wait before giving up- Returns:
- received message
-
receive
public org.springframework.messaging.Message<byte[]> receive()Allows to accessMessages received by thisOutputDestination.- Returns:
- received message
-
receive
public org.springframework.messaging.Message<byte[]> receive(long timeout)
-
receive(long, String)where you should use the actual binding name (e.g., "foo-in-0")