akka.testkit
Class DebugFilter
java.lang.Object
akka.testkit.EventFilter
akka.testkit.DebugFilter
- All Implemented Interfaces:
- java.io.Serializable, scala.Equals, scala.Product
public class DebugFilter
- extends EventFilter
- implements scala.Product, scala.Serializable
Filter which matches Debug events, if they satisfy the given criteria:
source
, if given, applies a filter on the event’s origin
message
applies a filter on the event’s message (either with String.startsWith or Regex.findFirstIn().isDefined)
If you want to match all Debug events, the most efficient is to use Left("")
.
- See Also:
- Serialized Form
Constructor Summary |
DebugFilter(scala.Option<java.lang.String> source,
scala.util.Either<java.lang.String,scala.util.matching.Regex> message,
boolean complete,
int occurrences)
|
DebugFilter(java.lang.String source,
java.lang.String message,
boolean pattern,
boolean complete,
int occurrences)
Java API: create a DebugFilter |
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()
|
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 |
DebugFilter
public DebugFilter(scala.Option<java.lang.String> source,
scala.util.Either<java.lang.String,scala.util.matching.Regex> message,
boolean complete,
int occurrences)
DebugFilter
public DebugFilter(java.lang.String source,
java.lang.String message,
boolean pattern,
boolean complete,
int occurrences)
- Java API: create a DebugFilter
- 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’s message must match the given message string or pattern completelyoccurrences
- (undocumented)
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)