|
com.im.commons 6.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DFFeedback
Provides call backs for displaying progress and information as processes run in the DIF tier. A client can use the DFFeedback to report information to the user.
There are two simple default implementations:
DEV_NULL for ignoring all feedbackConsoleFeedback for output to console or another PrintStream
| Nested Class Summary | |
|---|---|
static class |
DFFeedback.Type
Types of messages to be used in DFFeedback. |
| Field Summary | |
|---|---|
static DFFeedback |
DEV_NULL
"Empty device" - all feedback is ignored. |
static String |
PROPERTY_CANCEL
Used by PropertyChangeListener for notifying about user-initiated cancel. |
| Method Summary | |
|---|---|
void |
addMessage(DFFeedback.Type type,
Object message,
Throwable t)
Adds a message to the feedback. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
void |
finish()
Indicate the task is done. |
String |
getId()
|
boolean |
isCancelled()
Return whether this operation was cancelled by user. |
void |
progress(int workunit)
Notify the user about completed work units. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
switchToDeterminate(int workunits)
Currently indeterminate task can be switched to show percentage completed. |
void |
switchToIndeterminate()
Currently determinate task (with percentage or time estimate) can be switched to indeterminate mode. |
| Field Detail |
|---|
static final String PROPERTY_CANCEL
PropertyChangeListener for notifying about user-initiated cancel.
static final DFFeedback DEV_NULL
ConsoleFeedback.
| Method Detail |
|---|
boolean isCancelled()
true, operation should stop as soon as possible.
String getId()
void addMessage(DFFeedback.Type type,
Object message,
Throwable t)
type - message - t - void switchToIndeterminate()
void switchToDeterminate(int workunits)
void progress(int workunit)
workunit - A cumulative number of work units completed so farvoid finish()
void addPropertyChangeListener(PropertyChangeListener listener)
listener - adds listener to be used for notifications about ie. user initiated cancelvoid removePropertyChangeListener(PropertyChangeListener listener)
listener - remove registered propertyChangeListener
|
com.im.commons 6.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||