public class RemoteCommandRunner extends Object implements CommandRunner
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Close the user session with the sshd.
|
void |
initialize()
Open a session to a remote sshd at the configured host and port.
|
int |
runCommand(List<String> args,
InputStream stdIn,
OutputStream stdOut,
OutputStream stdErr)
Submits the given command to the connected session.
|
public void initialize() throws IOException
IOException
is thrown.initialize
in interface CommandRunner
IOException
- thrown if authentication fails or networking problems occurpublic int runCommand(List<String> args, InputStream stdIn, OutputStream stdOut, OutputStream stdErr) throws IOException
runCommand
in interface CommandRunner
command
- the shell command to executestdOut
- standard output of the command is captured herestdErr
- standard error of the shell command is captured hereIOException
- thrown if any error occur communicating with the remote sshdpublic void dispose() throws IOException
dispose
in interface CommandRunner
IOException
- thrown if any errors occurCopyright © 2016 Actian Corporation. All rights reserved.