Package akka.testkit
Class TestEventListener
- java.lang.Object
-
- akka.event.Logging.DefaultLogger
-
- akka.testkit.TestEventListener
-
- All Implemented Interfaces:
Actor
,RequiresMessageQueue<LoggerMessageQueueSemantics>
,Logging.StdOutLogger
public class TestEventListener extends Logging.DefaultLogger
EventListener for running tests, which allows selectively filtering out expected messages. To use it, include something like this intoakka.test.conf
and run your tests with system property"akka.mode"
set to"test"
:akka { loggers = ["akka.testkit.TestEventListener"] }
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description TestEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(EventFilter filter)
boolean
filter(Logging.LogEvent event)
scala.collection.immutable.List<EventFilter>
filters()
void
filters_$eq(scala.collection.immutable.List<EventFilter> x$1)
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receive()
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.void
removeFilter(EventFilter filter)
-
Methods inherited from class akka.event.Logging.DefaultLogger
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, self
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, postStop, preRestart, preStart, sender, supervisorStrategy, unhandled
-
-
-
-
Method Detail
-
addFilter
public void addFilter(EventFilter filter)
-
filter
public boolean filter(Logging.LogEvent event)
-
filters
public scala.collection.immutable.List<EventFilter> filters()
-
filters_$eq
public void filters_$eq(scala.collection.immutable.List<EventFilter> x$1)
-
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface:Actor
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.- Specified by:
receive
in interfaceActor
- Overrides:
receive
in classLogging.DefaultLogger
-
removeFilter
public void removeFilter(EventFilter filter)
-
-