public class ScpCommand extends Object implements Command, Runnable, FileSystemAware
| Modifier and Type | Field and Description |
|---|---|
protected ExitCallback |
callback |
protected OutputStream |
err |
protected IOException |
error |
protected static int |
ERROR |
protected InputStream |
in |
protected static org.slf4j.Logger |
log |
protected String |
name |
protected static int |
OK |
protected boolean |
optD |
protected boolean |
optF |
protected boolean |
optP |
protected boolean |
optR |
protected boolean |
optT |
protected boolean |
optV |
protected OutputStream |
out |
protected String |
path |
protected FileSystemView |
root |
protected static int |
WARNING |
| Constructor and Description |
|---|
ScpCommand(String[] args) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ack() |
void |
destroy()
Destroy the shell.
|
protected int |
readAck(boolean canEof) |
protected void |
readDir(SshFile path) |
protected void |
readFile(SshFile path) |
protected String |
readLine() |
void |
run() |
void |
setErrorStream(OutputStream err)
Set the error stream that can be used by the shell to write its errors.
|
void |
setExitCallback(ExitCallback callback)
Set the callback that the shell has to call when it is closed.
|
void |
setFileSystemView(FileSystemView view)
Set the file system in which this shell will be executed.
|
void |
setInputStream(InputStream in)
Set the input stream that can be used by the shell to read input.
|
void |
setOutputStream(OutputStream out)
Set the output stream that can be used by the shell to write its output.
|
void |
start(Environment env)
Starts the shell.
|
protected void |
writeDir(String header,
SshFile path) |
protected void |
writeFile(String header,
SshFile path) |
protected static final org.slf4j.Logger log
protected static final int OK
protected static final int WARNING
protected static final int ERROR
protected String name
protected boolean optR
protected boolean optT
protected boolean optF
protected boolean optV
protected boolean optD
protected boolean optP
protected FileSystemView root
protected String path
protected InputStream in
protected OutputStream out
protected OutputStream err
protected ExitCallback callback
protected IOException error
public ScpCommand(String[] args)
public void setInputStream(InputStream in)
CommandsetInputStream in interface Commandpublic void setOutputStream(OutputStream out)
CommandsetOutputStream in interface Commandpublic void setErrorStream(OutputStream err)
CommandsetErrorStream in interface Commandpublic void setExitCallback(ExitCallback callback)
CommandsetExitCallback in interface Commandpublic void start(Environment env) throws IOException
Command
Thread(this).start();
start in interface CommandIOExceptionpublic void destroy()
Commandprotected void writeDir(String header, SshFile path) throws IOException
IOExceptionprotected void writeFile(String header, SshFile path) throws IOException
IOExceptionprotected String readLine() throws IOException
IOExceptionprotected void readFile(SshFile path) throws IOException
IOExceptionprotected void readDir(SshFile path) throws IOException
IOExceptionprotected void ack()
throws IOException
IOExceptionprotected int readAck(boolean canEof)
throws IOException
IOExceptionpublic void setFileSystemView(FileSystemView view)
FileSystemAwaresetFileSystemView in interface FileSystemAwareCopyright © 2008-2012 Apache Software Foundation. All Rights Reserved.