Class OutputDestination

java.lang.Object
org.springframework.cloud.stream.binder.test.OutputDestination

public class OutputDestination extends Object
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 receive() operation.
Author:
Oleg Zhurakousky
  • Constructor Details

    • OutputDestination

      public OutputDestination()
  • Method Details

    • receive

      public org.springframework.messaging.Message<byte[]> receive(long timeout, String bindingName)
    • clear

      public void clear()
      Will clear all output destinations.
      Since:
      3.0.6
    • clear

      public boolean clear(String destinationName)
      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

      public org.springframework.messaging.Message<byte[]> receive()
      Allows to access Messages received by this OutputDestination. This is a convenience method for cases when you only have one binding. For all other cases use receive(long, String) method.
      Returns:
      received message
    • receive

      public org.springframework.messaging.Message<byte[]> receive(long timeout)
      Allows to access Messages received by this OutputDestination. This is a convenience method for cases when you only have one binding. For all other cases use receive(long, String) method.
      Parameters:
      timeout - timeout for receiving message
      Returns:
      received message