Package jadx.gui.jobs
Class TaskWithExtraOnFinish
- java.lang.Object
-
- jadx.gui.jobs.TaskWithExtraOnFinish
-
- All Implemented Interfaces:
Cancelable,IBackgroundTask
public class TaskWithExtraOnFinish extends java.lang.Object implements IBackgroundTask
Add additional `onFinish` action to the existing task
-
-
Constructor Summary
Constructors Constructor Description TaskWithExtraOnFinish(IBackgroundTask task, java.lang.Runnable extraOnFinish)TaskWithExtraOnFinish(IBackgroundTask task, java.util.function.Consumer<TaskStatus> extraOnFinish)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanBeCanceled()voidcancel()booleancheckMemoryUsage()Executor will check memory usage on every tick and cancel job if no free memory available.intgetCancelTimeoutMS()@Nullable java.util.function.Consumer<ITaskProgress>getProgressListener()Return progress notifications listener (use executor tick rate and thread) (Optional)intgetShutdownTimeoutMS()@Nullable ITaskProgressgetTaskProgress()Get task progress (Optional)java.lang.StringgetTitle()booleanisCanceled()voidonDone(ITaskInfo taskInfo)Called on executor thread after the all jobs finished.voidonFinish(ITaskInfo taskInfo)Executed on the Event Dispatch Thread after the all jobs finished.jadx.api.utils.tasks.ITaskExecutorscheduleTasks()inttimeLimit()Global (for all jobs) time limit in milliseconds (0 - to disable).
-
-
-
Constructor Detail
-
TaskWithExtraOnFinish
public TaskWithExtraOnFinish(IBackgroundTask task, java.util.function.Consumer<TaskStatus> extraOnFinish)
-
TaskWithExtraOnFinish
public TaskWithExtraOnFinish(IBackgroundTask task, java.lang.Runnable extraOnFinish)
-
-
Method Detail
-
onFinish
public void onFinish(ITaskInfo taskInfo)
Description copied from interface:IBackgroundTaskExecuted on the Event Dispatch Thread after the all jobs finished.- Specified by:
onFinishin interfaceIBackgroundTask
-
getTitle
public java.lang.String getTitle()
- Specified by:
getTitlein interfaceIBackgroundTask
-
scheduleTasks
public jadx.api.utils.tasks.ITaskExecutor scheduleTasks()
- Specified by:
scheduleTasksin interfaceIBackgroundTask
-
onDone
public void onDone(ITaskInfo taskInfo)
Description copied from interface:IBackgroundTaskCalled on executor thread after the all jobs finished.- Specified by:
onDonein interfaceIBackgroundTask
-
getProgressListener
@Nullable public @Nullable java.util.function.Consumer<ITaskProgress> getProgressListener()
Description copied from interface:IBackgroundTaskReturn progress notifications listener (use executor tick rate and thread) (Optional)- Specified by:
getProgressListenerin interfaceIBackgroundTask
-
getTaskProgress
@Nullable public @Nullable ITaskProgress getTaskProgress()
Description copied from interface:IBackgroundTaskGet task progress (Optional)- Specified by:
getTaskProgressin interfaceIBackgroundTask
-
canBeCanceled
public boolean canBeCanceled()
- Specified by:
canBeCanceledin interfaceIBackgroundTask
-
isCanceled
public boolean isCanceled()
- Specified by:
isCanceledin interfaceCancelable
-
cancel
public void cancel()
- Specified by:
cancelin interfaceCancelable
-
timeLimit
public int timeLimit()
Description copied from interface:IBackgroundTaskGlobal (for all jobs) time limit in milliseconds (0 - to disable).- Specified by:
timeLimitin interfaceIBackgroundTask
-
checkMemoryUsage
public boolean checkMemoryUsage()
Description copied from interface:IBackgroundTaskExecutor will check memory usage on every tick and cancel job if no free memory available.- Specified by:
checkMemoryUsagein interfaceIBackgroundTask
-
getCancelTimeoutMS
public int getCancelTimeoutMS()
- Specified by:
getCancelTimeoutMSin interfaceCancelable
-
getShutdownTimeoutMS
public int getShutdownTimeoutMS()
- Specified by:
getShutdownTimeoutMSin interfaceCancelable
-
-