public interface DMXTask extends Runnable
Represents a long running task that should be run in background. This interface provides method declarations needed to provide common functionality for background tasks across multiple platforms. Main properties of this kind of tasks should be:
Modifier and Type | Method and Description |
---|---|
void |
addTaskStatusListener(TaskStatusListener listener)
Add listener to track changes to task status.
|
GUIBlockingScope |
getBlockingScope()
Returns GUI block scope for this task.
|
String |
getControllerId()
Returns ID of controller that should be executed with this task.
|
String[] |
getIdsToBlock()
Returns an array of IDs of GUI components that should be blocked while this task is executing.
|
String |
getProgressViewId()
Returns ID of view that should display progress for this task.
|
boolean |
isProgressAware()
Indicates whether this task should track it's progress.
|
void |
setArguments(Object... args)
Set arguments for execution.
|
void |
setController(DMXController controller)
Set controller which will perform actual task.
|
String getControllerId()
GUIBlockingScope getBlockingScope()
String[] getIdsToBlock()
DMXView
instances or individual GUI components (eg. buttons, labels, etc).boolean isProgressAware()
false
true
if task supports publishing progress info, false
otherwiseString getProgressViewId()
void setController(DMXController controller)
controller
- controllervoid setArguments(Object... args)
args
- argumentsvoid addTaskStatusListener(TaskStatusListener listener)
listener
- task listenerCopyright © 2012-2014 Vektor Software. All Rights Reserved.