Class InfoFilter

java.lang.Object
org.apache.pekko.testkit.EventFilter
org.apache.pekko.testkit.InfoFilter
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public final class InfoFilter extends EventFilter implements scala.Product, Serializable
Filter which matches Info 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 Info events, the most efficient is to use Left("").
See Also:
  • Constructor Details

    • InfoFilter

      public InfoFilter(scala.Option<String> source, scala.util.Either<String,scala.util.matching.Regex> message, boolean complete, int occurrences)
    • InfoFilter

      public InfoFilter(String source, String message, boolean pattern, boolean complete, int occurrences)
      Java API: create an InfoFilter

      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
  • Method Details

    • apply

      public static InfoFilter apply(scala.Option<String> source, scala.util.Either<String,scala.util.matching.Regex> message, boolean complete, int occurrences)
    • unapply

      public static scala.Option<scala.Tuple3<scala.Option<String>,scala.util.Either<String,scala.util.matching.Regex>,Object>> unapply(InfoFilter x$0)
    • source

      public scala.Option<String> source()
      Overrides:
      source in class EventFilter
    • message

      public scala.util.Either<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
    • copy

      public InfoFilter copy(scala.Option<String> source, scala.util.Either<String,scala.util.matching.Regex> message, boolean complete, int occurrences)
    • copy$default$1

      public scala.Option<String> copy$default$1()
    • copy$default$2

      public scala.util.Either<String,scala.util.matching.Regex> copy$default$2()
    • copy$default$3

      public boolean copy$default$3()
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • productElementName

      public String productElementName(int x$1)
      Specified by:
      productElementName in interface scala.Product
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object x$1)
      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object