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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clears the list of received messages.Throwable
getFailure()
boolean
hasCompleted()
boolean
hasFailed()
String
name()
List<? extends Message<T>>
received()
-
-
-
Method Detail
-
name
String name()
- Returns:
- the channel name.
-
received
List<? extends 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()
returnedtrue
.
-
-