Package de.intarsys.tools.reporter
Class ReportDispatcher
- java.lang.Object
-
- de.intarsys.tools.reporter.ReportDispatcher
-
- All Implemented Interfaces:
IReporter
,IReporterSupport
public class ReportDispatcher extends java.lang.Object implements IReporterSupport, IReporter
Helper object for implementingIReporterSupport
.
-
-
Field Summary
-
Fields inherited from interface de.intarsys.tools.reporter.IReporter
STYLE_BEEP, STYLE_NONE, STYLE_STANDALONE
-
-
Constructor Summary
Constructors Constructor Description ReportDispatcher(java.lang.Object pOwner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReporter(IReporter newReporter)
void
attach(IReporterSupport support)
void
clear()
void
detach(IReporterSupport support)
java.lang.Object
getOwner()
boolean
isEmpty()
void
removeReporter(IReporter newReporter)
void
reportActivityEnd()
Indicate the end of an activity.void
reportActivityStart(java.lang.String message, int style)
Indicate the beginning of an activity, possibly blocking system interaction.void
reportError(java.lang.String title, java.lang.String message, java.lang.Throwable t, int style)
Indicate an error condition.void
reportMessage(java.lang.String title, java.lang.String message, int style)
Report a message to the user.void
reportProgress(java.lang.String message, int percent, int style)
Indicate the progress of an ongoing activity.void
reportStatus(java.lang.String message, int style)
Report a simple state information.
-
-
-
Method Detail
-
addReporter
public void addReporter(IReporter newReporter)
- Specified by:
addReporter
in interfaceIReporterSupport
-
attach
public void attach(IReporterSupport support)
-
clear
public void clear()
-
detach
public void detach(IReporterSupport support)
-
getOwner
public java.lang.Object getOwner()
-
isEmpty
public boolean isEmpty()
-
removeReporter
public void removeReporter(IReporter newReporter)
- Specified by:
removeReporter
in interfaceIReporterSupport
-
reportActivityEnd
public void reportActivityEnd()
Description copied from interface:IReporter
Indicate the end of an activity.- Specified by:
reportActivityEnd
in interfaceIReporter
-
reportActivityStart
public void reportActivityStart(java.lang.String message, int style)
Description copied from interface:IReporter
Indicate the beginning of an activity, possibly blocking system interaction.- Specified by:
reportActivityStart
in interfaceIReporter
- Parameters:
message
- A label for reporting the activity.
-
reportError
public void reportError(java.lang.String title, java.lang.String message, java.lang.Throwable t, int style)
Description copied from interface:IReporter
Indicate an error condition. This method will return normally after a possible user interaction, any error handling is still up to the caller.- Specified by:
reportError
in interfaceIReporter
-
reportMessage
public void reportMessage(java.lang.String title, java.lang.String message, int style)
Description copied from interface:IReporter
Report a message to the user. The message should be displayed in a blocking way in an interactive system.- Specified by:
reportMessage
in interfaceIReporter
-
reportProgress
public void reportProgress(java.lang.String message, int percent, int style)
Description copied from interface:IReporter
Indicate the progress of an ongoing activity. The activity will probably run concurrently.- Specified by:
reportProgress
in interfaceIReporter
-
reportStatus
public void reportStatus(java.lang.String message, int style)
Description copied from interface:IReporter
Report a simple state information. This should not block the system in any way.- Specified by:
reportStatus
in interfaceIReporter
-
-