public abstract class AbstractCommandTask extends AbstractSessionTask<SessionChannelNG>
Modifier and Type | Field and Description |
---|---|
static int |
EXIT_CODE_NOT_RECEIVED |
Constructor and Description |
---|
AbstractCommandTask(com.sshtools.common.ssh.SshConnection con,
java.lang.String command) |
AbstractCommandTask(com.sshtools.common.ssh.SshConnection con,
java.lang.String command,
com.sshtools.common.ssh.ChannelRequestFuture future) |
AbstractCommandTask(com.sshtools.common.ssh.SshConnection con,
java.lang.String command,
java.lang.String charset) |
AbstractCommandTask(com.sshtools.common.ssh.SshConnection con,
java.lang.String command,
java.lang.String charset,
com.sshtools.common.ssh.ChannelRequestFuture future) |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeExecuteCommand(SessionChannelNG session) |
protected SessionChannelNG |
createSession(com.sshtools.common.ssh.SshConnection con) |
java.lang.String |
getCommand() |
int |
getExitCode() |
protected void |
onCloseSession(SessionChannelNG session) |
protected void |
setupSession(SessionChannelNG session) |
changeTerminalDimensions, close, disconnect, doTask, getChannelFuture, getLastError, getSession, isClosed, onOpenSession
addFutureListener, done, isDone, isSuccess, waitFor, waitForever
public static final int EXIT_CODE_NOT_RECEIVED
public AbstractCommandTask(com.sshtools.common.ssh.SshConnection con, java.lang.String command, java.lang.String charset)
public AbstractCommandTask(com.sshtools.common.ssh.SshConnection con, java.lang.String command, java.lang.String charset, com.sshtools.common.ssh.ChannelRequestFuture future)
public AbstractCommandTask(com.sshtools.common.ssh.SshConnection con, java.lang.String command)
public AbstractCommandTask(com.sshtools.common.ssh.SshConnection con, java.lang.String command, com.sshtools.common.ssh.ChannelRequestFuture future)
protected SessionChannelNG createSession(com.sshtools.common.ssh.SshConnection con)
createSession
in class AbstractSessionTask<SessionChannelNG>
protected void onCloseSession(SessionChannelNG session)
onCloseSession
in class AbstractSessionTask<SessionChannelNG>
public int getExitCode()
public java.lang.String getCommand()
protected final void setupSession(SessionChannelNG session)
setupSession
in class AbstractSessionTask<SessionChannelNG>
protected void beforeExecuteCommand(SessionChannelNG session)
Copyright © 2022. All rights reserved.