public class SSHJSession extends Object implements SSHClient.CliSession
MODE_OCRNL, MODE_ONLRET, MODE_ONOCR
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the SSH session
|
InputStream |
getErrorStream() |
InputStream |
getInputStream() |
StringBuilder |
getLine()
Return the line buffer
|
OutputStream |
getOutputStream() |
BufferedReader |
getReader()
Return the session input reader
|
int |
getReadTimeout()
Return the configured read timeout
|
String |
getTermPrintlnMode()
Get configured println mode
|
PrintWriter |
getWriter()
Return the session output writer
|
void |
logDebug(String msg)
Log on debug level
|
void |
logInfo(String msg)
Log on info level
|
boolean |
ready(int timeout)
Checks if the input reader is ready for reading.
|
boolean |
serverSideClosed()
Returns true if session has been closed
|
void |
setReadTimeout(int readTimeout)
Configure the readTimeout
|
void |
setTermPrintlnMode(String mode)
Configure println mode
|
void |
setTracer(NedTracer tracer)
Enable tracer
|
void |
trace(String msg,
String direction)
Append to tracer
|
void |
traceInBufAppend(String msg)
Append to trace in buf
|
void |
traceInBufFlush()
Flush trace in buffer
|
public boolean ready(int timeout) throws IOException
ready
in interface SSHClient.CliSession
timeout
- - TimeoutIOException
public boolean serverSideClosed()
serverSideClosed
in interface CliSession
public void close()
close
in interface CliSession
public int getReadTimeout()
getReadTimeout
in interface SSHClient.CliSession
public void setReadTimeout(int readTimeout)
setReadTimeout
in interface SSHClient.CliSession
public BufferedReader getReader()
getReader
in interface SSHClient.CliSession
public PrintWriter getWriter()
getWriter
in interface SSHClient.CliSession
public StringBuilder getLine()
getLine
in interface SSHClient.CliSession
public void setTracer(NedTracer tracer)
setTracer
in interface CliSession
public void trace(String msg, String direction)
trace
in interface SSHClient.CliSession
public void traceInBufAppend(String msg)
traceInBufAppend
in interface SSHClient.CliSession
public void traceInBufFlush()
traceInBufFlush
in interface SSHClient.CliSession
public void logInfo(String msg)
logInfo
in interface SSHClient.CliSession
public void logDebug(String msg)
logDebug
in interface SSHClient.CliSession
public String getTermPrintlnMode()
getTermPrintlnMode
in interface SSHClient.CliSession
public void setTermPrintlnMode(String mode)
setTermPrintlnMode
in interface SSHClient.CliSession
public InputStream getInputStream()
getInputStream
in interface SSHClient.CliSession
public InputStream getErrorStream()
getErrorStream
in interface SSHClient.CliSession
public OutputStream getOutputStream()
getOutputStream
in interface SSHClient.CliSession