akka.testkit
Class TestEventListener

java.lang.Object
  extended by akka.event.Logging.DefaultLogger
      extended by akka.testkit.TestEventListener
All Implemented Interfaces:
Actor, 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 into akka.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$
 
Constructor Summary
TestEventListener()
           
 
Method Summary
 void addFilter(EventFilter filter)
           
 boolean filter(Logging.LogEvent event)
           
 scala.collection.immutable.List<EventFilter> filters()
           
 scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
          This defines the initial actor behavior, it must return a partial function with the actor logic.
 void removeFilter(EventFilter filter)
           
 
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, context, postRestart, postStop, preRestart, preStart, self, sender, supervisorStrategy, unhandled
 
Methods inherited from interface akka.event.Logging.StdOutLogger
date, dateFormat, debug, debugFormat, error, errorFormat, errorFormatWithoutCause, info, infoFormat, print, timestamp, warning, warningFormat
 

Constructor Detail

TestEventListener

public TestEventListener()
Method Detail

filters

public scala.collection.immutable.List<EventFilter> filters()

receive

public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface: Actor
This defines the initial actor behavior, it must return a partial function with the actor logic.

Specified by:
receive in interface Actor
Overrides:
receive in class Logging.DefaultLogger
Returns:
(undocumented)

filter

public boolean filter(Logging.LogEvent event)

addFilter

public void addFilter(EventFilter filter)

removeFilter

public void removeFilter(EventFilter filter)