Package org.praxislive.ide.core.api
Class SerialTasks
java.lang.Object
org.praxislive.ide.core.api.AbstractTask
org.praxislive.ide.core.api.SerialTasks
- All Implemented Interfaces:
org.openide.util.Cancellable,Task
-
Nested Class Summary
Nested classes/interfaces inherited from class org.praxislive.ide.core.api.AbstractTask
AbstractTask.WithResult<T>Nested classes/interfaces inherited from interface org.praxislive.ide.core.api.Task
Task.State -
Field Summary
Fields inherited from interface org.praxislive.ide.core.api.Task
PROP_STATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidprotected voidbeforeTask(Task task) protected booleanIf the task is cancellable, this method should be overridden and handle any necessary steps, returningtrueif the task has been cancelled.protected final voidHandle a call to execution.intMethods inherited from class org.praxislive.ide.core.api.AbstractTask
addPropertyChangeListener, cancel, execute, getState, removePropertyChangeListener, updateStateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.praxislive.ide.core.api.Task
description, log
-
Constructor Details
-
SerialTasks
-
SerialTasks
-
-
Method Details
-
remaining
public int remaining() -
beforeExecute
protected void beforeExecute() -
afterExecute
protected void afterExecute() -
beforeTask
-
afterTask
-
handleExecute
Description copied from class:AbstractTaskHandle a call to execution. The state will have been updated toTask.State.RUNNINGprior to this method. This method should callAbstractTask.updateState(org.praxislive.ide.core.api.Task.State)to change the state returned fromAbstractTask.execute(), or update the state at a later point. If this method throws an exception, the task will be set to theTask.State.ERRORstate.- Specified by:
handleExecutein classAbstractTask- Throws:
Exception- if the task cannot be executed
-
handleCancel
protected boolean handleCancel()Description copied from class:AbstractTaskIf the task is cancellable, this method should be overridden and handle any necessary steps, returningtrueif the task has been cancelled. The state will be updated automatically.- Overrides:
handleCancelin classAbstractTask- Returns:
- true to have task marked as cancelled
-