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)
Formatter#format(String, Object[]) version of TaskListener.error(String). |
PrintWriter |
fatalError(String msg)
A fatal error in the build.
|
PrintWriter |
fatalError(String format,
Object... args)
Formatter#format(String, Object[]) version of TaskListener.fatalError(String). |
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)
BuildListenerstarted in interface BuildListenercauses - Causes that started a build. See Run.getCauses().public void finished(Result result)
BuildListenerfinished in interface BuildListenerpublic PrintStream getLogger()
TaskListenergetLogger in interface TaskListenerpublic void annotate(ConsoleNote ann) throws IOException
TaskListenerannotate in interface TaskListenerIOExceptionpublic void hyperlink(String url, String text) throws IOException
TaskListenerHyperlinkNote on the given text.hyperlink in interface TaskListenerurl - If this starts with '/', it's interpreted as a path within the context path.IOExceptionpublic PrintWriter error(String msg)
TaskListenererror in interface TaskListenerpublic PrintWriter error(String format, Object... args)
TaskListenerFormatter#format(String, Object[]) version of TaskListener.error(String).error in interface TaskListenerpublic PrintWriter fatalError(String msg)
TaskListenerfatalError in interface TaskListenerpublic PrintWriter fatalError(String format, Object... args)
TaskListenerFormatter#format(String, Object[]) version of TaskListener.fatalError(String).fatalError in interface TaskListenerpublic static BuildListener wrap(TaskListener l)
Copyright © 2019. All rights reserved.