Interface InMemorySink<T>

Type Parameters:
T - the type payload expected in the received messages.

public interface InMemorySink<T>
Allows interacting with an in-memory sink. An in-memory sink is a channel in which you can observes the received messages and events.
  • Method Details

    • name

      String name()
      Returns:
      the channel name.
    • received

      List<? extends org.eclipse.microprofile.reactive.messaging.Message<T>> received()
      Returns:
      the list, potentially empty, of the received messages. The implementation must return a copy of the list. The clear() method allows flushing the list.
    • clear

      void clear()
      Clears the list of received messages. It also reset the received failure (if any) and the received completion event.
    • hasCompleted

      boolean hasCompleted()
      Returns:
      true if the channel received the completion event.
    • hasFailed

      boolean hasFailed()
      Returns:
      true if the channel received the failure event.
    • getFailure

      Throwable getFailure()
      Returns:
      the failure if hasFailed() returned true.