public class JSchSshTerminal extends Object
JSch and ChannelShell object to facilitate submission of commands through an
emulated SSH terminal.| Constructor and Description |
|---|
JSchSshTerminal()
Create a terminal with no timeout.
|
JSchSshTerminal(com.cerner.ftp.jsch.ConnectionPool pool)
Create a terminal.
|
| Modifier and Type | Method and Description |
|---|---|
TerminalResponse |
executeCommandGroups(List<CommandExpectationGroup> commandExpectationGroups)
Execute a list of CommandExpectationGroup.
|
void |
setExpectationTimeout(long expectationTimeout)
Sets the expectation timeout for this terminal.
|
void |
setOutputStream(OutputStream stream)
Set an output stream to which console output should be piped.
|
public JSchSshTerminal()
public JSchSshTerminal(com.cerner.ftp.jsch.ConnectionPool pool)
pool - A ConnectionPool from which connections are to be retrieved.public TerminalResponse executeCommandGroups(List<CommandExpectationGroup> commandExpectationGroups) throws SshException
commandExpectationGroups - The command expectation groups to execute.SshException - The exception thrown if something goes wrong.SshExceptionpublic void setOutputStream(OutputStream stream)
stream - The OutputStream object to which SSH console data should be piped.public void setExpectationTimeout(long expectationTimeout)
expectationTimeout - The expecationTimout value to set. The value will not be set if the provided value is not positive. If
the value was not previously set it will be the default value 20000.Copyright © 2019. All rights reserved.