Interface TethysUIThreadManager
- All Superinterfaces:
OceanusEventRegistrar.OceanusEventProvider<TethysUIThreadEvent>,TethysUIThreadStatusReport
- All Known Implementing Classes:
TethysUICoreThreadManager
public interface TethysUIThreadManager
extends OceanusEventRegistrar.OceanusEventProvider<TethysUIThreadEvent>, TethysUIThreadStatusReport
Thread Manager.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel the worker.Obtain the active profile.getError()Get error.Obtain the status manager.obtain the task name.Obtain the thread data.booleanDo we have a running thread.voidsetNewProfile(String pTask) Create new profile.voidsetReportingSteps(int pSteps) Set the thread Data.voidsetThreadData(Object pThreadData) Set the thread Data.voidshutdown()Shut down the thread manager.<T> voidstartThread(TethysUIThread<T> pThread) Start a thread.Methods inherited from interface io.github.tonywasher.joceanus.oceanus.event.OceanusEventRegistrar.OceanusEventProvider
getEventRegistrarMethods inherited from interface io.github.tonywasher.joceanus.tethys.api.thread.TethysUIThreadStatusReport
checkForCancellation, getActiveTask, initTask, setCompletion, setNewStage, setNextStep, setNextStep, setNumStages, setNumSteps, setStepsDone, throwCancelException
-
Method Details
-
getStatusManager
TethysUIThreadStatusManager getStatusManager()Obtain the status manager.- Returns:
- the status Manager
-
getTaskName
String getTaskName()obtain the task name.- Returns:
- the task name
-
hasWorker
boolean hasWorker()Do we have a running thread.- Returns:
- true/false
-
setReportingSteps
void setReportingSteps(int pSteps) Set the thread Data.- Parameters:
pSteps- the reporting steps
-
getError
Throwable getError()Get error.- Returns:
- the error
-
setThreadData
Set the thread Data.- Parameters:
pThreadData- the threadData
-
getThreadData
Object getThreadData()Obtain the thread data.- Returns:
- the threadData
-
startThread
Start a thread.- Type Parameters:
T- the thread result- Parameters:
pThread- the thread to start
-
shutdown
void shutdown()Shut down the thread manager. -
cancelWorker
void cancelWorker()cancel the worker. -
getActiveProfile
OceanusProfile getActiveProfile()Obtain the active profile.- Returns:
- the active profile
-
setNewProfile
Create new profile.- Parameters:
pTask- the name of the task
-