akka.testkit
Class ErrorFilter

java.lang.Object
  extended by akka.testkit.EventFilter
      extended by akka.testkit.ErrorFilter
All Implemented Interfaces:
java.io.Serializable, scala.Equals, scala.Product

public class ErrorFilter
extends EventFilter
implements scala.Product, scala.Serializable

Filter which matches Error events, if they satisfy the given criteria:

If you want to match all Error events, the most efficient is to use Left("").

See Also:
Serialized Form

Constructor Summary
ErrorFilter(java.lang.Class<?> throwable)
          Java API: filter only on the given type of exception
ErrorFilter(java.lang.Class<?> throwable, scala.Option<java.lang.String> source, scala.util.Either<java.lang.String,scala.util.matching.Regex> message, boolean complete, int occurrences)
           
ErrorFilter(java.lang.Class<?> throwable, java.lang.String source, java.lang.String message, boolean pattern, boolean complete, int occurrences)
          Java API: create an ErrorFilter
 
Method Summary
 boolean complete()
           
 boolean matches(Logging.LogEvent event)
          This method decides whether to filter the event (true) or not (false).
 scala.util.Either<java.lang.String,scala.util.matching.Regex> message()
           
 scala.Option<java.lang.String> source()
           
 java.lang.Class<?> throwable()
           
 
Methods inherited from class akka.testkit.EventFilter
apply, awaitDone, custom, debug, doMatch, error, info, intercept, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

ErrorFilter

public ErrorFilter(java.lang.Class<?> throwable,
                   scala.Option<java.lang.String> source,
                   scala.util.Either<java.lang.String,scala.util.matching.Regex> message,
                   boolean complete,
                   int occurrences)

ErrorFilter

public ErrorFilter(java.lang.Class<?> throwable,
                   java.lang.String source,
                   java.lang.String message,
                   boolean pattern,
                   boolean complete,
                   int occurrences)
Java API: create an ErrorFilter

Parameters:
source - apply this filter only to events from the given source; do not filter on source if this is given as null
message - apply this filter only to events whose message matches; do not filter on message if this is given as null
pattern - if false, the message string must start with the given string, otherwise the message argument is treated as regular expression which is matched against the message (may match only a substring to filter)
complete - whether the event&rsquo;s message must match the given message string or pattern completely
throwable - (undocumented)
occurrences - (undocumented)

ErrorFilter

public ErrorFilter(java.lang.Class<?> throwable)
Java API: filter only on the given type of exception

Parameters:
throwable - (undocumented)
Method Detail

throwable

public java.lang.Class<?> throwable()

source

public scala.Option<java.lang.String> source()
Overrides:
source in class EventFilter

message

public scala.util.Either<java.lang.String,scala.util.matching.Regex> message()
Overrides:
message in class EventFilter

complete

public boolean complete()
Overrides:
complete in class EventFilter

matches

public boolean matches(Logging.LogEvent event)
Description copied from class: EventFilter
This method decides whether to filter the event (true) or not (false).

Specified by:
matches in class EventFilter
Parameters:
event - (undocumented)
Returns:
(undocumented)