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 aTaskListeneras aBuildListenerfor 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 voidannotate(ConsoleNote ann)Annotates the current position in the output log by using the given annotation.PrintWritererror(String msg)An error in the build.PrintWritererror(String format, Object... args)PrintWriterfatalError(String msg)A fatal error in the build.PrintWriterfatalError(String format, Object... args)PrintStreamgetLogger()This writer will receive the output of the buildvoidhyperlink(String url, String text)Places aHyperlinkNoteon the given text.static BuildListenerwrap(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:TaskListenerThis writer will receive the output of the build- Specified by:
getLoggerin interfaceTaskListener
-
annotate
public void annotate(ConsoleNote ann) throws IOException
Description copied from interface:TaskListenerAnnotates 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:
annotatein interfaceTaskListener- Throws:
IOException
-
hyperlink
public void hyperlink(String url, String text) throws IOException
Description copied from interface:TaskListenerPlaces aHyperlinkNoteon the given text.- Specified by:
hyperlinkin 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:TaskListenerAn error in the build.- Specified by:
errorin 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:
errorin interfaceTaskListener
-
fatalError
public PrintWriter fatalError(String msg)
Description copied from interface:TaskListenerA fatal error in the build.- Specified by:
fatalErrorin 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:
fatalErrorin interfaceTaskListener
-
wrap
public static BuildListener wrap(TaskListener l)
-
-