Class LogWatcher

java.lang.Object
org.jenkinsci.test.acceptance.log.LogWatcher
All Implemented Interfaces:
LogListener

public class LogWatcher extends Object implements LogListener
Receives log as LogListener, and provides a regular expression pattern matching.
Author:
Vivek Pandey, Kohsuke Kawaguchi
  • Field Details

    • splitter

      protected final LogSplitter splitter
      All the listeners in here is LogWatcher.Watchers.
  • Constructor Details

    • LogWatcher

      public LogWatcher()
  • Method Details

    • processLine

      public void processLine(String line) throws IOException
      Description copied from interface: LogListener
      Receives log output from Jenkins process one line at a time, in the order.
      Specified by:
      processLine in interface LogListener
      Throws:
      IOException
    • processClose

      public void processClose(Exception t)
      Description copied from interface: LogListener
      Indicates the EOF.
      Specified by:
      processClose in interface LogListener
      Parameters:
      t - if the termination of log source is unexpected, indicate the cause of the problem.
    • watch

      public Future<Matcher> watch(Pattern regexp)
      Starts watching an expression in the output.

      Returned future will signal when the expression is found.