public interface SshConnection extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
connect()
Connects to this target.
|
OutputStream |
openStandardInput()
Opens the remote standard input.
|
InputStream |
openStandardOutput()
Opens the remote standard output.
|
void |
redirectStandardOutput(OutputStream output,
boolean dontClose)
Opens the remote standar output and redirects into the specified output.
|
int |
waitForExit(long timeout)
Waits for the remote command exits.
|
void connect() throws IOException
IOException
- if failed to connect.OutputStream openStandardInput() throws IOException
IOException
- if failed to openInputStream openStandardOutput() throws IOException
IOException
- if failed to openvoid redirectStandardOutput(OutputStream output, boolean dontClose)
output
- the redirection targetdontClose
- keep opened on the remote output is closedIllegalArgumentException
- if any parameter is null
int waitForExit(long timeout) throws IOException, InterruptedException
timeout
- waiting duration in millisecondsIOException
- if failed to waitInterruptedException
- if interruptedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.