public abstract class JavaTestKit.ReceiveWhile<T>
extends java.lang.Object
match
function or the idle timeout is met (disabled by
default) or the overall maximum duration is elapsed. Returns the sequence
of messages.
Note that it is not an error to hit the max
duration in this
case.
One possible use of this method is for testing whether messages of certain characteristics are generated at a certain rate.
Constructor and Description |
---|
ReceiveWhile(java.lang.Class<T> clazz) |
ReceiveWhile(java.lang.Class<T> clazz,
scala.concurrent.duration.Duration max) |
ReceiveWhile(java.lang.Class<T> clazz,
scala.concurrent.duration.Duration max,
scala.concurrent.duration.Duration idle,
int messages) |
ReceiveWhile(java.lang.Class<T> clazz,
scala.concurrent.duration.Duration max,
int messages) |
Modifier and Type | Method and Description |
---|---|
T[] |
get() |
protected abstract T |
match(java.lang.Object msg) |
protected java.lang.RuntimeException |
noMatch() |
public ReceiveWhile(java.lang.Class<T> clazz)
public ReceiveWhile(java.lang.Class<T> clazz, scala.concurrent.duration.Duration max)
public ReceiveWhile(java.lang.Class<T> clazz, scala.concurrent.duration.Duration max, int messages)
public ReceiveWhile(java.lang.Class<T> clazz, scala.concurrent.duration.Duration max, scala.concurrent.duration.Duration idle, int messages)