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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Will clear all output destinations.
    boolean
    clear(String destinationName)
    Will clear output destination with specified name.
    org.springframework.messaging.Message<byte[]>
    Allows to access Messages received by this OutputDestination.
    org.springframework.messaging.Message<byte[]>
    receive(long timeout)
     
    org.springframework.messaging.Message<byte[]>
    receive(long timeout, int bindingIndex)
    Deprecated.
    since 3.0.2 in favor of receive(long, String) where you should use the actual binding name (e.g., "foo-in-0")
    org.springframework.messaging.Message<byte[]>
    receive(long timeout, String bindingName)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      @Deprecated public org.springframework.messaging.Message<byte[]> receive(long timeout, int bindingIndex)
      Deprecated.
      since 3.0.2 in favor of receive(long, String) where you should use the actual binding name (e.g., "foo-in-0")
      Allows to access Messages received by this OutputDestination.
      Parameters:
      timeout - how long to wait before giving up
      Returns:
      received message
    • receive

      public org.springframework.messaging.Message<byte[]> receive()
      Allows to access Messages received by this OutputDestination.
      Returns:
      received message
    • receive

      public org.springframework.messaging.Message<byte[]> receive(long timeout)