Package jadx.gui.jobs
Class SimpleTask
- java.lang.Object
-
- jadx.gui.jobs.SimpleTask
-
- All Implemented Interfaces:
Cancelable,IBackgroundTask
public class SimpleTask extends java.lang.Object implements IBackgroundTask
Simple not cancelable task with memory check
-
-
Constructor Summary
Constructors Constructor Description SimpleTask(java.lang.String title, java.lang.Runnable run)SimpleTask(java.lang.String title, java.lang.Runnable run, java.lang.Runnable onFinish)SimpleTask(java.lang.String title, java.util.List<java.lang.Runnable> jobs)SimpleTask(java.lang.String title, java.util.List<java.lang.Runnable> jobs, @Nullable java.util.function.Consumer<TaskStatus> onFinish)
-
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.java.util.List<java.lang.Runnable>getJobs()@Nullable java.util.function.Consumer<TaskStatus>getOnFinish()java.lang.StringgetTitle()booleanisCanceled()voidonFinish(ITaskInfo taskInfo)Executed on the Event Dispatch Thread after the all jobs finished.jadx.api.utils.tasks.ITaskExecutorscheduleTasks()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jadx.gui.jobs.Cancelable
getCancelTimeoutMS, getShutdownTimeoutMS
-
Methods inherited from interface jadx.gui.jobs.IBackgroundTask
getProgressListener, getTaskProgress, onDone, timeLimit
-
-
-
-
Constructor Detail
-
SimpleTask
public SimpleTask(java.lang.String title, java.lang.Runnable run)
-
SimpleTask
public SimpleTask(java.lang.String title, java.lang.Runnable run, java.lang.Runnable onFinish)
-
SimpleTask
public SimpleTask(java.lang.String title, java.util.List<java.lang.Runnable> jobs)
-
SimpleTask
public SimpleTask(java.lang.String title, java.util.List<java.lang.Runnable> jobs, @Nullable @Nullable java.util.function.Consumer<TaskStatus> onFinish)
-
-
Method Detail
-
getTitle
public java.lang.String getTitle()
- Specified by:
getTitlein interfaceIBackgroundTask
-
getJobs
public java.util.List<java.lang.Runnable> getJobs()
-
getOnFinish
@Nullable public @Nullable java.util.function.Consumer<TaskStatus> getOnFinish()
-
scheduleTasks
public jadx.api.utils.tasks.ITaskExecutor scheduleTasks()
- Specified by:
scheduleTasksin interfaceIBackgroundTask
-
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
-
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
-
canBeCanceled
public boolean canBeCanceled()
- Specified by:
canBeCanceledin interfaceIBackgroundTask
-
isCanceled
public boolean isCanceled()
- Specified by:
isCanceledin interfaceCancelable
-
cancel
public void cancel()
- Specified by:
cancelin interfaceCancelable
-
-