Package akka.testkit
Class JavaTestKit.ReceiveWhile<T>
- java.lang.Object
-
- akka.testkit.JavaTestKit.ReceiveWhile<T>
-
- Enclosing class:
- JavaTestKit
public abstract class JavaTestKit.ReceiveWhile<T> extends java.lang.Object
Receive a series of messages until one does not match the givenmatch
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 Summary
Constructors Constructor 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, int messages)
ReceiveWhile(java.lang.Class<T> clazz, scala.concurrent.duration.Duration max, scala.concurrent.duration.Duration idle, int messages)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T[]
get()
protected abstract T
match(java.lang.Object msg)
protected java.lang.RuntimeException
noMatch()
-
-
-
Constructor Detail
-
ReceiveWhile
public ReceiveWhile(java.lang.Class<T> clazz)
-
ReceiveWhile
public ReceiveWhile(java.lang.Class<T> clazz, scala.concurrent.duration.Duration max)
-
ReceiveWhile
public ReceiveWhile(java.lang.Class<T> clazz, scala.concurrent.duration.Duration max, int messages)
-
ReceiveWhile
public ReceiveWhile(java.lang.Class<T> clazz, scala.concurrent.duration.Duration max, scala.concurrent.duration.Duration idle, int messages)
-
-