Package com.sshtools.client.tasks
Class CommandTask
- All Implemented Interfaces:
RequestFuture,Closeable,AutoCloseable,Runnable
Task for executing commands.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forCommandTask.static interfaceFunctional interface for tasks run on certain command task events.Nested classes/interfaces inherited from class com.sshtools.client.tasks.AbstractSessionTask
AbstractSessionTask.AbstractSessionTaskBuilder<B extends AbstractSessionTask.AbstractSessionTaskBuilder<B,SC, TT>, SC extends AbstractSessionChannel, TT extends AbstractSessionTask<SC>> Nested classes/interfaces inherited from class com.sshtools.client.tasks.AbstractConnectionTask
AbstractConnectionTask.AbstractConnectionTaskBuilder<B extends AbstractConnectionTask.AbstractConnectionTaskBuilder<B,T>, T extends AbstractConnectionTask> Nested classes/interfaces inherited from class com.sshtools.client.tasks.Task
Task.TaskRunnable<T> -
Field Summary
Fields inherited from class com.sshtools.client.tasks.AbstractCommandTask
EXIT_CODE_NOT_RECEIVEDFields inherited from class com.sshtools.client.tasks.AbstractConnectionTask
clientSupplierFields inherited from class com.sshtools.common.ssh.ConnectionAwareTask
con, lastError -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidbeforeExecuteCommand(SessionChannelNG session) protected voidDeprecated, for removal: This API element is subject to removal in a future version.protected final SessionChannelNGfinal Stringfinal intprotected final voidonCloseSession(SessionChannelNG session) Deprecated, for removal: This API element is subject to removal in a future version.protected final voidonOpenSession(SessionChannelNG session) Methods inherited from class com.sshtools.client.tasks.AbstractCommandTask
setupSessionMethods inherited from class com.sshtools.client.tasks.AbstractSessionTask
changeTerminalDimensions, close, disconnect, doTask, getChannelFuture, getSession, isClosedMethods inherited from class com.sshtools.client.tasks.Task
ofRunnableMethods inherited from class com.sshtools.common.ssh.ConnectionAwareTask
getLastError, runMethods inherited from class com.sshtools.common.ssh.AbstractRequestFuture
addFutureListener, done, isDone, isSuccess, waitFor, waitForeverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sshtools.common.ssh.RequestFuture
isDoneAndSuccess
-
Method Details
-
onCloseSession
@Deprecated(since="3.1.0", forRemoval=true) protected final void onCloseSession(SessionChannelNG session) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
onCloseSessionin classAbstractCommandTask
-
getExitCode
public final int getExitCode()- Overrides:
getExitCodein classAbstractCommandTask
-
getCommand
- Overrides:
getCommandin classAbstractCommandTask
-
createSession
- Overrides:
createSessionin classAbstractCommandTask
-
closeOnTaskComplete
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
closeOnTaskCompletein classAbstractSessionTask<SessionChannelNG>
-
onOpenSession
- Specified by:
onOpenSessionin classAbstractSessionTask<SessionChannelNG>- Throws:
IOException
-
beforeExecuteCommand
- Overrides:
beforeExecuteCommandin classAbstractCommandTask
-