Class JenkinsLogWatcher
- java.lang.Object
-
- org.jenkinsci.test.acceptance.controller.JenkinsLogWatcher
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,LogListenable
public class JenkinsLogWatcher extends Object implements LogListenable, Closeable
LogWatcher
for monitoring output from Jenkins- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description JenkinsLogWatcher(String id, InputStream pipe, File logFile, LogListener printer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLogListener(LogListener l)
void
close()
void
removeLogListener(LogListener l)
void
start()
Starts scanning logs.void
waitTillReady()
Block until Jenkins is up and running
-
-
-
Constructor Detail
-
JenkinsLogWatcher
public JenkinsLogWatcher(String id, InputStream pipe, File logFile, LogListener printer) throws FileNotFoundException
- Parameters:
id
- Short ID that indicates the log that we are watching.printer
- The printer to use to write the Jenkins logging statements to- Throws:
FileNotFoundException
-
-
Method Detail
-
start
public void start()
Starts scanning logs.
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
waitTillReady
public void waitTillReady()
Block until Jenkins is up and running
-
addLogListener
public void addLogListener(LogListener l)
- Specified by:
addLogListener
in interfaceLogListenable
-
removeLogListener
public void removeLogListener(LogListener l)
- Specified by:
removeLogListener
in interfaceLogListenable
-
-