Package com.sshtools.client.tasks
Class AbstractCommandTask
java.lang.Object
com.sshtools.common.ssh.AbstractRequestFuture
com.sshtools.common.ssh.ConnectionAwareTask
com.sshtools.client.tasks.Task
com.sshtools.client.tasks.AbstractConnectionTask
com.sshtools.client.tasks.AbstractSessionTask<SessionChannelNG>
com.sshtools.client.tasks.AbstractCommandTask
- All Implemented Interfaces:
com.sshtools.common.ssh.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 int
Deprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class com.sshtools.client.tasks.AbstractConnectionTask
clientSupplier
Fields inherited from class com.sshtools.common.ssh.ConnectionAwareTask
con, lastError
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractCommandTask
(AbstractSessionTask.AbstractSessionTaskBuilder<?, SessionChannelNG, ?> builder, String command, String charset, boolean autoConsume) Deprecated.AbstractCommandTask
(com.sshtools.common.ssh.SshConnection con, String command) Deprecated, for removal: This API element is subject to removal in a future version.AbstractCommandTask
(com.sshtools.common.ssh.SshConnection con, String command, com.sshtools.common.ssh.ChannelRequestFuture future) Deprecated, for removal: This API element is subject to removal in a future version.AbstractCommandTask
(com.sshtools.common.ssh.SshConnection con, String command, String charset) Deprecated, for removal: This API element is subject to removal in a future version.AbstractCommandTask
(com.sshtools.common.ssh.SshConnection con, String command, String charset, com.sshtools.common.ssh.ChannelRequestFuture future) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
beforeExecuteCommand
(SessionChannelNG session) Deprecated, for removal: This API element is subject to removal in a future version.protected SessionChannelNG
createSession
(com.sshtools.common.ssh.SshConnection con) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated.int
Deprecated.protected void
onCloseSession
(SessionChannelNG session) Deprecated, for removal: This API element is subject to removal in a future version.protected final void
setupSession
(SessionChannelNG session) Deprecated.Methods inherited from class com.sshtools.client.tasks.AbstractSessionTask
changeTerminalDimensions, close, closeOnTaskComplete, disconnect, doTask, getChannelFuture, getSession, isClosed, onOpenSession
Methods inherited from class com.sshtools.client.tasks.Task
ofRunnable
Methods inherited from class com.sshtools.common.ssh.ConnectionAwareTask
getLastError, run
Methods inherited from class com.sshtools.common.ssh.AbstractRequestFuture
addFutureListener, done, isDone, isSuccess, waitFor, waitForever
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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(com.sshtools.common.ssh.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(com.sshtools.common.ssh.SshConnection con, String command, String charset, com.sshtools.common.ssh.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(com.sshtools.common.ssh.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(com.sshtools.common.ssh.SshConnection con, String command, com.sshtools.common.ssh.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(com.sshtools.common.ssh.SshConnection con) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createSession
in classAbstractSessionTask<SessionChannelNG>
-
onCloseSession
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
onCloseSession
in classAbstractSessionTask<SessionChannelNG>
-
getExitCode
public int getExitCode()Deprecated. -
getCommand
Deprecated. -
setupSession
Deprecated.- Specified by:
setupSession
in 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.
-