public static interface SSHClient.CliSession extends CliSession
Modifier and Type | Field and Description |
---|---|
static String |
MODE_OCRNL
Newline modes supported by the CLI session
|
static String |
MODE_ONLRET |
static String |
MODE_ONOCR |
Modifier and Type | Method and Description |
---|---|
default String |
expect(Pattern p) |
default NedExpectResult |
expect(Pattern[] p) |
default NedExpectResult |
expect(Pattern[] p,
boolean include,
int timeout) |
default NedExpectResult |
expect(Pattern[] p,
boolean include,
int timeout,
boolean full) |
default NedExpectResult |
expect(Pattern[] p,
boolean include,
int timeout,
boolean full,
NedWorker worker) |
default NedExpectResult |
expect(Pattern[] p,
boolean include,
int timeout,
NedWorker worker) |
default NedExpectResult |
expect(Pattern[] p,
NedWorker worker) |
default String |
expect(Pattern p,
boolean include,
int timeout) |
default String |
expect(Pattern p,
boolean include,
int timeout,
NedWorker worker) |
default String |
expect(Pattern p,
NedWorker worker) |
default String |
expect(String str) |
default NedExpectResult |
expect(String[] str) |
default NedExpectResult |
expect(String[] str,
boolean include,
int timeout) |
default NedExpectResult |
expect(String[] str,
boolean include,
int timeout,
NedWorker worker) |
default NedExpectResult |
expect(String[] str,
NedWorker worker) |
default String |
expect(String str,
boolean include,
boolean full,
int timeout) |
default String |
expect(String str,
boolean include,
boolean full,
int timeout,
NedWorker worker) |
default String |
expect(String str,
boolean include,
int timeout) |
default String |
expect(String str,
boolean include,
int timeout,
NedWorker worker) |
default String |
expect(String str,
int timeout) |
default String |
expect(String str,
int timeout,
NedWorker worker) |
default String |
expect(String str,
NedWorker worker) |
default void |
flush()
Signals that the final chunk of data has to be printed to the output
transport stream.
|
InputStream |
getErrorStream() |
InputStream |
getInputStream() |
StringBuilder |
getLine() |
OutputStream |
getOutputStream() |
BufferedReader |
getReader() |
int |
getReadTimeout()
Interface methods that must be implemented
|
String |
getTermPrintlnMode() |
PrintWriter |
getWriter() |
void |
logDebug(String msg) |
void |
logInfo(String msg) |
default void |
print(int iVal)
Prints an integer (as text) to the output stream.
|
default void |
print(String s)
Prints text to the output stream.
|
default void |
println(int iVal)
Prints an integer (as text) to the output stream.
|
default void |
println(String s)
Print text to the output stream.
|
default boolean |
ready()
Interface methods with default implementation
|
boolean |
ready(int timeout) |
void |
setReadTimeout(int readTimeout) |
void |
setTermPrintlnMode(String mode) |
void |
trace(String msg,
String direction) |
void |
traceInBufAppend(String msg) |
void |
traceInBufFlush() |
close, serverSideClosed, setTracer
static final String MODE_OCRNL
static final String MODE_ONOCR
static final String MODE_ONLRET
int getReadTimeout()
void setReadTimeout(int readTimeout)
BufferedReader getReader()
PrintWriter getWriter()
StringBuilder getLine()
void traceInBufAppend(String msg)
void traceInBufFlush()
void logInfo(String msg)
void logDebug(String msg)
String getTermPrintlnMode()
void setTermPrintlnMode(String mode)
boolean ready(int timeout) throws IOException
IOException
InputStream getInputStream()
InputStream getErrorStream()
OutputStream getOutputStream()
default boolean ready() throws IOException
IOException
default String expect(String str) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default String expect(Pattern p) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default String expect(String str, NedWorker worker) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default String expect(Pattern p, NedWorker worker) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default String expect(String str, int timeout) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default String expect(String str, int timeout, NedWorker worker) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default String expect(String str, boolean include, int timeout) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default String expect(Pattern p, boolean include, int timeout) throws SSHSessionException, IOException
SSHSessionException
IOException
default NedExpectResult expect(String[] str) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default NedExpectResult expect(Pattern[] p) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default NedExpectResult expect(String[] str, boolean include, int timeout) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default NedExpectResult expect(Pattern[] p, boolean include, int timeout) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default String expect(String str, boolean include, int timeout, NedWorker worker) throws SSHSessionException, IOException
SSHSessionException
IOException
default String expect(Pattern p, boolean include, int timeout, NedWorker worker) throws SSHSessionException, IOException
SSHSessionException
IOException
default NedExpectResult expect(String[] str, NedWorker worker) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default NedExpectResult expect(Pattern[] p, NedWorker worker) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default NedExpectResult expect(String[] str, boolean include, int timeout, NedWorker worker) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default NedExpectResult expect(Pattern[] p, boolean include, int timeout, NedWorker worker) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default NedExpectResult expect(Pattern[] p, boolean include, int timeout, boolean full) throws SSHSessionException, IOException
SSHSessionException
IOException
default NedExpectResult expect(Pattern[] p, boolean include, int timeout, boolean full, NedWorker worker) throws SSHSessionException, IOException
SSHSessionException
IOException
default String expect(String str, boolean include, boolean full, int timeout) throws IOException, SSHSessionException
expect
in interface CliSession
IOException
SSHSessionException
default String expect(String str, boolean include, boolean full, int timeout, NedWorker worker) throws SSHSessionException, IOException
expect
in interface CliSession
SSHSessionException
IOException
default void print(int iVal)
iVal
- Text to send to the stream.default void print(String s)
print
in interface CliSession
s
- Text to send to the stream.default void println(int iVal)
iVal
- Text to send to the stream.default void println(String s)
println
in interface CliSession
s
- Text to send to the stream.default void flush()
flush
in interface CliSession