Package jenkins.util
Class BuildListenerAdapter
- java.lang.Object
-
- jenkins.util.BuildListenerAdapter
-
- All Implemented Interfaces:
BuildListener
,TaskListener
,Serializable
,org.jenkinsci.remoting.SerializableOnlyOverRemoting
public final class BuildListenerAdapter extends Object implements BuildListener
Wraps aTaskListener
as aBuildListener
for compatibility with APIs which historically expected the latter.- Since:
- 1.577
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface hudson.model.TaskListener
NULL
-
-
Constructor Summary
Constructors Constructor Description BuildListenerAdapter(TaskListener delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
PrintStream
getLogger()
This writer will receive the output of the buildvoid
hyperlink(String url, String text)
Places aHyperlinkNote
on the given text.static BuildListener
wrap(TaskListener l)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.model.BuildListener
finished, started
-
Methods inherited from interface org.jenkinsci.remoting.SerializableOnlyOverRemoting
getChannelForSerialization
-
Methods inherited from interface hudson.model.TaskListener
getCharset
-
-
-
-
Constructor Detail
-
BuildListenerAdapter
public BuildListenerAdapter(TaskListener delegate)
-
-
Method Detail
-
getLogger
public PrintStream getLogger()
Description copied from interface:TaskListener
This writer will receive the output of the build- Specified by:
getLogger
in interfaceTaskListener
-
annotate
public void annotate(ConsoleNote ann) throws IOException
Description copied from interface:TaskListener
Annotates the current position in the output log by using the given annotation. If the implementation doesn't support annotated output log, this method might be no-op.- Specified by:
annotate
in interfaceTaskListener
- Throws:
IOException
-
hyperlink
public void hyperlink(String url, String text) throws IOException
Description copied from interface:TaskListener
Places aHyperlinkNote
on the given text.- Specified by:
hyperlink
in interfaceTaskListener
- Parameters:
url
- If this starts with '/', it's interpreted as a path within the context path.- Throws:
IOException
-
error
public PrintWriter error(String msg)
Description copied from interface:TaskListener
An error in the build.- Specified by:
error
in interfaceTaskListener
- Returns:
- A writer to receive details of the error.
-
error
public PrintWriter error(String format, Object... args)
Description copied from interface:TaskListener
- Specified by:
error
in interfaceTaskListener
-
fatalError
public PrintWriter fatalError(String msg)
Description copied from interface:TaskListener
A fatal error in the build.- Specified by:
fatalError
in interfaceTaskListener
- Returns:
- A writer to receive details of the error.
-
fatalError
public PrintWriter fatalError(String format, Object... args)
Description copied from interface:TaskListener
- Specified by:
fatalError
in interfaceTaskListener
-
wrap
public static BuildListener wrap(TaskListener l)
-
-