public class ScpCommand extends ExecutableCommand implements Runnable
com.maverick.sshd.SshDaemon#configure(com.maverick.sshd.ConfigurationContext)
method using the following codecontext.addCommand("scp", ScpCommand.class);
session, stderr, stdin, stdout, STILL_ACTIVE
Constructor and Description |
---|
ScpCommand() |
ScpCommand(String currentDirectory)
Creates a new ScpCommand object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeSession() |
protected FilenamePattern |
createFilenamePattern(String pattern)
Creates a
FilenamePattern . |
boolean |
createProcess(String command,
Map<String,String> environment)
Parse the SCP command line and configure the command ready for execution.
|
int |
getExitCode()
Get the exit code for this process.
|
protected long |
getTimeout() |
void |
kill()
Called when channel is closing
|
void |
onStart()
Start the process.
|
void |
run() |
getInputStream, getOutputStream, getSession, getStderrOutputStream, init, processStdinData, start
public ScpCommand()
public ScpCommand(String currentDirectory)
public boolean createProcess(String command, Map<String,String> environment)
createProcess
in class ExecutableCommand
command
- environment
- public int getExitCode()
ExecutableCommand
ExecutableCommand.STILL_ACTIVE
.getExitCode
in class ExecutableCommand
public void kill()
kill
in class ExecutableCommand
public void onStart()
onStart
in class ExecutableCommand
IOException
protected FilenamePattern createFilenamePattern(String pattern)
FilenamePattern
. Override to customize pattern matching
behaviour.pattern
- Stringprotected void closeSession()
protected long getTimeout()
getTimeout
in class ExecutableCommand
Copyright © 2024. All rights reserved.