public class ExecutionMode
extends java.lang.Object
Constructor and Description |
---|
ExecutionMode(boolean cancelable,
java.lang.String title,
java.lang.String title2,
boolean runInBG,
boolean runWithModal,
javax.swing.JComponent progressParentComponent) |
Modifier and Type | Method and Description |
---|---|
void |
addProcessListener(ProcessListener listener) |
boolean |
cancelable() |
java.util.List<ProcessListener> |
getProcessListeners() |
javax.swing.JComponent |
getProgressParentComponent() |
int |
getTimeout() |
java.lang.String |
getTitle() |
java.lang.String |
getTitle2() |
boolean |
inBackGround() |
void |
onTimeout(ProcessHandler processHandler,
java.lang.String commandLineString,
ProcessOutput outputCollected,
java.lang.Throwable invocatorStack)
Invoked on the
processHandler waiting timeout by the execution helper. |
void |
setShouldCancelFun(java.util.function.BooleanSupplier shouldCancelFun) |
java.util.function.BooleanSupplier |
shouldCancelFun()
Runner checks this fun during process running, if returns true, process will be canceled.
|
boolean |
withModalProgress() |
public ExecutionMode(boolean cancelable, java.lang.String title, java.lang.String title2, boolean runInBG, boolean runWithModal, javax.swing.JComponent progressParentComponent)
public int getTimeout()
public void onTimeout(ProcessHandler processHandler, java.lang.String commandLineString, ProcessOutput outputCollected, java.lang.Throwable invocatorStack)
processHandler
waiting timeout by the execution helper.outputCollected
- output collected to the moment of timeout (if any)invocatorStack
- stacktrace from the entrance to ExecutionHelper.createTimeLimitedExecutionProcess(ProcessHandler, ExecutionMode, String)
ExecutionHelper.createTimeLimitedExecutionProcess(ProcessHandler, ExecutionMode, String)
public java.lang.String getTitle()
public java.lang.String getTitle2()
public boolean cancelable()
public boolean inBackGround()
public boolean withModalProgress()
public javax.swing.JComponent getProgressParentComponent()
public java.util.function.BooleanSupplier shouldCancelFun()
public void setShouldCancelFun(java.util.function.BooleanSupplier shouldCancelFun)
public void addProcessListener(ProcessListener listener)
public java.util.List<ProcessListener> getProcessListeners()