Package com.sshtools.client.tasks
Class AbstractCommandTask
- All Implemented Interfaces:
RequestFuture,Closeable,AutoCloseable,Runnable
- Direct Known Subclasses:
CommandTask
@Deprecated(since="3.1.0")
public abstract class AbstractCommandTask
extends AbstractSessionTask<SessionChannelNG>
Deprecated.
An abstract task for executing commands.
-
Nested Class Summary
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
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class com.sshtools.client.tasks.AbstractConnectionTask
clientSupplierFields inherited from class com.sshtools.common.ssh.ConnectionAwareTask
con, lastError -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCommandTask(AbstractSessionTask.AbstractSessionTaskBuilder<?, SessionChannelNG, ?> builder, String command, String charset, boolean autoConsume) Deprecated.AbstractCommandTask(SshConnection con, String command) Deprecated, for removal: This API element is subject to removal in a future version.AbstractCommandTask(SshConnection con, String command, ChannelRequestFuture future) Deprecated, for removal: This API element is subject to removal in a future version.AbstractCommandTask(SshConnection con, String command, String charset) Deprecated, for removal: This API element is subject to removal in a future version.AbstractCommandTask(SshConnection con, String command, String charset, ChannelRequestFuture future) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbeforeExecuteCommand(SessionChannelNG session) Deprecated, for removal: This API element is subject to removal in a future version.protected SessionChannelNGDeprecated, for removal: This API element is subject to removal in a future version.Deprecated.intDeprecated.protected voidonCloseSession(SessionChannelNG session) Deprecated, for removal: This API element is subject to removal in a future version.protected final voidsetupSession(SessionChannelNG session) Deprecated.Methods inherited from class com.sshtools.client.tasks.AbstractSessionTask
changeTerminalDimensions, close, closeOnTaskComplete, disconnect, doTask, getChannelFuture, getSession, isClosed, onOpenSessionMethods 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
-
Field Details
-
EXIT_CODE_NOT_RECEIVED
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Constructor Details
-
AbstractCommandTask
protected AbstractCommandTask(AbstractSessionTask.AbstractSessionTaskBuilder<?, SessionChannelNG, ?> builder, String command, String charset, boolean autoConsume) Deprecated. -
AbstractCommandTask
@Deprecated(since="3.1.0", forRemoval=true) public AbstractCommandTask(SshConnection con, String command, String charset) Deprecated, for removal: This API element is subject to removal in a future version. -
AbstractCommandTask
@Deprecated(since="3.1.0", forRemoval=true) public AbstractCommandTask(SshConnection con, String command, String charset, ChannelRequestFuture future) Deprecated, for removal: This API element is subject to removal in a future version. -
AbstractCommandTask
@Deprecated(since="3.1.0", forRemoval=true) public AbstractCommandTask(SshConnection con, String command) Deprecated, for removal: This API element is subject to removal in a future version. -
AbstractCommandTask
@Deprecated(since="3.1.0", forRemoval=true) public AbstractCommandTask(SshConnection con, String command, ChannelRequestFuture future) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
createSession
@Deprecated(since="3.1.0", forRemoval=true) protected SessionChannelNG createSession(SshConnection con) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createSessionin classAbstractSessionTask<SessionChannelNG>
-
onCloseSession
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
onCloseSessionin classAbstractSessionTask<SessionChannelNG>
-
getExitCode
public int getExitCode()Deprecated. -
getCommand
Deprecated. -
setupSession
Deprecated.- Specified by:
setupSessionin classAbstractSessionTask<SessionChannelNG>
-
beforeExecuteCommand
@Deprecated(since="3.1.0", forRemoval=true) protected void beforeExecuteCommand(SessionChannelNG session) Deprecated, for removal: This API element is subject to removal in a future version.
-