public class ScpCommand extends AbstractFileSystemCommand
| Modifier and Type | Field and Description |
|---|---|
protected IOException |
error |
protected ScpTransferEventListener |
listener |
protected ScpFileOpener |
opener |
protected boolean |
optD |
protected boolean |
optF |
protected boolean |
optP |
protected boolean |
optR |
protected boolean |
optT |
protected String |
path |
protected int |
receiveBufferSize |
protected int |
sendBufferSize |
fileSystemcallback, cbCalled, cmdFuture, cmdRunner, command, environment, err, executorService, in, out, serverSessionlog| Constructor and Description |
|---|
ScpCommand(String command,
org.apache.sshd.common.util.threads.CloseableExecutorService executorService,
int sendSize,
int receiveSize,
ScpFileOpener fileOpener,
ScpTransferEventListener eventListener) |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
start(Environment env) |
String |
toString() |
protected void |
writeCommandResponseMessage(String command,
int exitValue,
String exitMessage) |
destroy, getFileSystem, setFileSystemgetCommand, getEnvironment, getErrorStream, getExecutorService, getExitCallback, getInputStream, getOutputStream, getServerSession, getSession, getStartedCommandFuture, onExit, onExit, setErrorStream, setExitCallback, setInputStream, setOutputStream, setSessiongetSimplifiedLoggerprotected final int sendBufferSize
protected final int receiveBufferSize
protected final ScpFileOpener opener
protected boolean optR
protected boolean optT
protected boolean optF
protected boolean optD
protected boolean optP
protected String path
protected IOException error
protected ScpTransferEventListener listener
public ScpCommand(String command, org.apache.sshd.common.util.threads.CloseableExecutorService executorService, int sendSize, int receiveSize, ScpFileOpener fileOpener, ScpTransferEventListener eventListener)
command - The command to be executedexecutorService - An CloseableExecutorService to be used when
start(Environment)-ing execution. If null an ad-hoc
single-threaded service is created and used.sendSize - Size (in bytes) of buffer to use when sending filesreceiveSize - Size (in bytes) of buffer to use when receiving filesfileOpener - The ScpFileOpener - if null then DefaultScpFileOpener is usedeventListener - An ScpTransferEventListener - may be nullThreadUtils.newSingleThreadExecutor(String),
ScpHelper.MIN_SEND_BUFFER_SIZE,
ScpHelper.MIN_RECEIVE_BUFFER_SIZEpublic void start(Environment env) throws IOException
start in interface CommandLifecyclestart in class AbstractCommandSupportIOExceptionpublic void run()
protected void writeCommandResponseMessage(String command, int exitValue, String exitMessage) throws IOException
IOExceptionpublic String toString()
toString in class AbstractCommandSupportCopyright © 2018–2019 The Apache Software Foundation. All rights reserved.