public final class BuildListenerAdapter extends Object implements BuildListener
TaskListener
as a BuildListener
for compatibility with APIs which historically expected the latter.
Does not support BuildListener.started(java.util.List<hudson.model.Cause>)
or BuildListener.finished(hudson.model.Result)
.NULL
Constructor and Description |
---|
BuildListenerAdapter(TaskListener delegate) |
Modifier and Type | Method and Description |
---|---|
void |
annotate(ConsoleNote ann)
Annotates the current position in the output log by using the given annotation.
|
PrintWriter |
error(String msg)
An error in the build.
|
PrintWriter |
error(String format,
Object... args)
|
PrintWriter |
fatalError(String msg)
A fatal error in the build.
|
PrintWriter |
fatalError(String format,
Object... args)
|
void |
finished(Result result)
Called when a build is finished.
|
PrintStream |
getLogger()
This writer will receive the output of the build
|
void |
hyperlink(String url,
String text)
Places a
HyperlinkNote on the given text. |
void |
started(List<Cause> causes)
Called when a build is started.
|
static BuildListener |
wrap(TaskListener l) |
public BuildListenerAdapter(TaskListener delegate)
public void started(List<Cause> causes)
BuildListener
started
in interface BuildListener
causes
- Causes that started a build. See Run.getCauses()
.public void finished(Result result)
BuildListener
finished
in interface BuildListener
public PrintStream getLogger()
TaskListener
getLogger
in interface TaskListener
public void annotate(ConsoleNote ann) throws IOException
TaskListener
annotate
in interface TaskListener
IOException
public void hyperlink(String url, String text) throws IOException
TaskListener
HyperlinkNote
on the given text.hyperlink
in interface TaskListener
url
- If this starts with '/', it's interpreted as a path within the context path.IOException
public PrintWriter error(String msg)
TaskListener
error
in interface TaskListener
public PrintWriter error(String format, Object... args)
TaskListener
error
in interface TaskListener
public PrintWriter fatalError(String msg)
TaskListener
fatalError
in interface TaskListener
public PrintWriter fatalError(String format, Object... args)
TaskListener
fatalError
in interface TaskListener
public static BuildListener wrap(TaskListener l)
Copyright © 2016. All rights reserved.