public abstract class MessageHandler
extends java.lang.Object
There are three types of messages:
Constructor and Description |
---|
MessageHandler() |
Modifier and Type | Method and Description |
---|---|
void |
finishedComputation()
Notifies the owner of handler that the operation has completed
successfully.
|
abstract void |
message(java.lang.String message,
int progress)
Reports a calculation progress message.
|
abstract void |
reportError(java.util.List<Problem> problems)
Reports a list of errors.
|
void |
reportError(java.lang.String message)
Reports a single error.
|
void |
reportError(java.lang.String message,
java.lang.Throwable t)
Reports a single error caused by an exception.
|
public abstract void message(java.lang.String message, int progress)
message
- Describes the calculation currently being performed. If
the string is null
, the currently shown message
remains the same, only the progress indicator is to be updated.progress
- Integer between 0 and 100 indicating the progress
(100=finished). If progress is negative, the currently shown
progress remains the same, only the message is to be updated.public final void reportError(java.lang.String message)
message
- A description of the error that occurred.public final void reportError(java.lang.String message, java.lang.Throwable t)
message
- A description of the operation being performed when the
exception was raised.t
- The exception (or, in rare cases, java.lang.Error)public abstract void reportError(java.util.List<Problem> problems)
problems
- The list of problems to report.public void finishedComputation()