|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskListener
Receives events that happen during some lengthy operation that has some chance of failures, such as a build, SCM change polling, slave launch, and so on.
This interface is implemented by Hudson core and passed to extension points so that they can record the progress of the operation without really knowing how those information and handled/stored by Hudson.
The information is one way or the other made available to users, and
so the expectation is that when something goes wrong, enough information
shall be written to a TaskListener
so that the user can diagnose
what's going wrong.
StreamTaskListener
is the most typical implementation of this interface.
All the TaskListener
implementations passed to plugins from Hudson core are remotable.
AbstractTaskListener
Field Summary | |
---|---|
static TaskListener |
NULL
TaskListener that discards the output. |
Method Summary | |
---|---|
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 error(String) . |
PrintWriter |
fatalError(String msg)
A fatal error in the build. |
PrintWriter |
fatalError(String format,
Object... args)
Formatter.format(String, Object[]) version of fatalError(String) . |
PrintStream |
getLogger()
This writer will receive the output of the build |
void |
hyperlink(String url,
String text)
Places a HyperlinkNote on the given text. |
Field Detail |
---|
static final TaskListener NULL
TaskListener
that discards the output.
Method Detail |
---|
PrintStream getLogger()
void annotate(ConsoleNote ann) throws IOException
IOException
void hyperlink(String url, String text) throws IOException
HyperlinkNote
on the given text.
url
- If this starts with '/', it's interpreted as a path within the context path.
IOException
PrintWriter error(String msg)
PrintWriter error(String format, Object... args)
Formatter.format(String, Object[])
version of error(String)
.
PrintWriter fatalError(String msg)
PrintWriter fatalError(String format, Object... args)
Formatter.format(String, Object[])
version of fatalError(String)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |