Package com.tailf.ned
Interface SSHClient.CliSession
- All Superinterfaces:
CliSession
- All Known Implementing Classes:
SSHJSession
- Enclosing interface:
- SSHClient
The SSH CLI session interface.
Inherited from the old SSHSession implementation.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
default NedExpectResult
default NedExpectResult
default NedExpectResult
default NedExpectResult
default String
default String
default String
default String
default String
default String
default String
default String
default NedExpectResult
default NedExpectResult
default NedExpectResult
default NedExpectResult
default NedExpectResult
default NedExpectResult
default String
default String
default String
default void
flush()
Signals that the final chunk of data has to be printed to the output transport stream.getLine()
int
Interface methods that must be implementedvoid
void
default void
print
(int iVal) Prints an integer (as text) to the output stream.default void
Prints text to the output stream.default void
println
(int iVal) Prints an integer (as text) to the output stream.default void
Print text to the output stream.default boolean
ready()
Interface methods with default implementationboolean
ready
(int timeout) void
setReadTimeout
(int readTimeout) void
setTermPrintlnMode
(String mode) void
void
traceInBufAppend
(String msg) void
Methods inherited from interface com.tailf.ned.CliSession
close, serverSideClosed, setTracer
-
Field Details
-
MODE_OCRNL
Newline modes supported by the CLI session- See Also:
-
MODE_ONOCR
- See Also:
-
MODE_ONLRET
- See Also:
-
-
Method Details
-
getReadTimeout
int getReadTimeout()Interface methods that must be implemented -
setReadTimeout
void setReadTimeout(int readTimeout) -
getReader
BufferedReader getReader() -
getWriter
PrintWriter getWriter() -
getLine
StringBuilder getLine() -
trace
-
traceInBufAppend
-
traceInBufFlush
void traceInBufFlush() -
logInfo
-
logDebug
-
getTermPrintlnMode
String getTermPrintlnMode() -
setTermPrintlnMode
-
ready
- Throws:
IOException
-
getInputStream
InputStream getInputStream() -
getErrorStream
InputStream getErrorStream() -
getOutputStream
OutputStream getOutputStream() -
ready
Interface methods with default implementation- Throws:
IOException
-
expect
- Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
- Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
- Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
- Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
- Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default String expect(String str, int timeout, NedWorker worker) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default String expect(String str, boolean include, int timeout) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default String expect(Pattern p, boolean include, int timeout) throws SSHSessionException, IOException - Throws:
SSHSessionException
IOException
-
expect
- Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
- Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default NedExpectResult expect(String[] str, boolean include, int timeout) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default NedExpectResult expect(Pattern[] p, boolean include, int timeout) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default String expect(String str, boolean include, int timeout, NedWorker worker) throws SSHSessionException, IOException - Throws:
SSHSessionException
IOException
-
expect
default String expect(Pattern p, boolean include, int timeout, NedWorker worker) throws SSHSessionException, IOException - Throws:
SSHSessionException
IOException
-
expect
default NedExpectResult expect(String[] str, NedWorker worker) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default NedExpectResult expect(Pattern[] p, NedWorker worker) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default NedExpectResult expect(String[] str, boolean include, int timeout, NedWorker worker) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default NedExpectResult expect(Pattern[] p, boolean include, int timeout, NedWorker worker) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
expect
default NedExpectResult expect(Pattern[] p, boolean include, int timeout, boolean full) throws SSHSessionException, IOException - Throws:
SSHSessionException
IOException
-
expect
default NedExpectResult expect(Pattern[] p, boolean include, int timeout, boolean full, NedWorker worker) throws SSHSessionException, IOException - Throws:
SSHSessionException
IOException
-
expect
default String expect(String str, boolean include, boolean full, int timeout) throws IOException, SSHSessionException - Specified by:
expect
in interfaceCliSession
- Throws:
IOException
SSHSessionException
-
expect
default String expect(String str, boolean include, boolean full, int timeout, NedWorker worker) throws SSHSessionException, IOException - Specified by:
expect
in interfaceCliSession
- Throws:
SSHSessionException
IOException
-
print
default void print(int iVal) Prints an integer (as text) to the output stream.- Parameters:
iVal
- Text to send to the stream.
-
print
Prints text to the output stream.- Specified by:
print
in interfaceCliSession
- Parameters:
s
- Text to send to the stream.
-
println
default void println(int iVal) Prints an integer (as text) to the output stream. A newline char is appended to end of the output stream.- Parameters:
iVal
- Text to send to the stream.
-
println
Print text to the output stream. A newline char is appended to end of the output stream.- Specified by:
println
in interfaceCliSession
- Parameters:
s
- Text to send to the stream.
-
flush
default void flush()Signals that the final chunk of data has to be printed to the output transport stream. This method furthermore flushes the transport output stream buffer.- Specified by:
flush
in interfaceCliSession
-