akka.testkit
Class TestEventListener
java.lang.Object
akka.event.Logging.DefaultLogger
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 {
event-handlers = ["akka.testkit.TestEventListener"]
}
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface akka.event.Logging.StdOutLogger |
dateFormat, debug, debugFormat, error, errorFormat, errorFormatWithoutCause, info, infoFormat, print, timestamp, warning, warningFormat |
TestEventListener
public TestEventListener()
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
filter
public boolean filter(Logging.LogEvent event)
addFilter
public void addFilter(EventFilter filter)
removeFilter
public void removeFilter(EventFilter filter)