|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Reporter
A base interface to model a work in progress. Though exceptions work well for major, well, exceptions, they are lousy for reporting errors/warnings in a task. Logging also sucks because it is global, hard to relate to a single piece of work. This small (uncoupled) interface is intended to fill this gap. The idea is that different tasks can perform parts and the progress can be integrated. A reporter is not mandated to track locations. Locations should be seen as best effort.
| Nested Class Summary | |
|---|---|
static interface |
Reporter.SetLocation
Fluid interface to set location data |
| Nested classes/interfaces inherited from interface aQute.service.reporter.Report |
|---|
Report.Location |
| Method Summary | |
|---|---|
Reporter.SetLocation |
error(String format,
Object... args)
Create an error. |
Reporter.SetLocation |
exception(Throwable t,
String format,
Object... args)
Dedicated message for an exception. |
boolean |
isPedantic()
The provider of the reporter wants pedantic reporting, meaning every possible warning should be reported. |
void |
progress(float progress,
String format,
Object... args)
Create a warning. |
void |
trace(String format,
Object... args)
Create a warning. |
Reporter.SetLocation |
warning(String format,
Object... args)
Create a warning. |
| Methods inherited from interface aQute.service.reporter.Report |
|---|
getErrors, getLocation, getWarnings, isOk |
| Method Detail |
|---|
Reporter.SetLocation error(String format,
Object... args)
format - The format of the errorargs - The arguments of the error
Reporter.SetLocation warning(String format,
Object... args)
format - The format of the errorargs - The arguments of the error
void trace(String format,
Object... args)
format - The format of the errorargs - The arguments of the error
void progress(float progress,
String format,
Object... args)
progress - A value between 0 and 1 indicating the progress. 0 is starting
and >=1 is done.format - The format of the errorargs - The arguments of the error
Reporter.SetLocation exception(Throwable t,
String format,
Object... args)
t - The exceptions - The format of the messageargs - The argumentsboolean isPedantic()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||