com.mindbright.ssh
Class SSHConsoleClient
java.lang.Object
|
+--com.mindbright.ssh.SSHClientUserAdaptor
|
+--com.mindbright.ssh.SSHConsoleClient
- All Implemented Interfaces:
- SSHClientUser, SSHConsole, SSHConsoleRemote
- Direct Known Subclasses:
- SSHSCPClient
- public class SSHConsoleClient
- extends SSHClientUserAdaptor
- implements SSHConsole, SSHConsoleRemote
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_COPY_BUFFER_SZ
public static final int DEFAULT_COPY_BUFFER_SZ
- See Also:
- Constant Field Values
client
protected SSHClient client
proxyUser
protected SSHClientUser proxyUser
sshHost
protected java.lang.String sshHost
inTop
protected InputStreamPipe inTop
inBottom
protected OutputStreamPipe inBottom
stdout
protected java.io.OutputStream stdout
stdin
protected com.mindbright.ssh.SSHConsoleClient.TerminalOutStream stdin
SSHConsoleClient
public SSHConsoleClient(java.lang.String sshHost,
int port,
SSHAuthenticator authenticator,
SSHInteractor interactor)
throws java.io.IOException
SSHConsoleClient
public SSHConsoleClient(java.lang.String sshHost,
int port,
SSHAuthenticator authenticator,
SSHInteractor interactor,
int bufferSize)
throws java.io.IOException
command
public boolean command(java.lang.String command)
- Specified by:
command in interface SSHConsoleRemote
shell
public boolean shell()
- Specified by:
shell in interface SSHConsoleRemote
close
public void close()
- Specified by:
close in interface SSHConsoleRemote
changeStdOut
public void changeStdOut(java.io.OutputStream out)
- Specified by:
changeStdOut in interface SSHConsoleRemote
getStdIn
public java.io.OutputStream getStdIn()
- Specified by:
getStdIn in interface SSHConsoleRemote
getStdOut
public java.io.InputStream getStdOut()
- Specified by:
getStdOut in interface SSHConsoleRemote
setClientUser
public void setClientUser(SSHClientUser proxyUser)
stdoutWriteString
public void stdoutWriteString(byte[] str)
- Specified by:
stdoutWriteString in interface SSHConsole
stderrWriteString
public void stderrWriteString(byte[] str)
- Specified by:
stderrWriteString in interface SSHConsole
getTerminal
public Terminal getTerminal()
- Specified by:
getTerminal in interface SSHConsole
print
public void print(java.lang.String str)
- Specified by:
print in interface SSHConsole
println
public void println(java.lang.String str)
- Specified by:
println in interface SSHConsole
serverConnect
public void serverConnect(SSHChannelController controller,
SSHCipher sndCipher)
- Specified by:
serverConnect in interface SSHConsole
serverDisconnect
public void serverDisconnect(java.lang.String reason)
- Specified by:
serverDisconnect in interface SSHConsole
wantPTY
public boolean wantPTY()
- Specified by:
wantPTY in interface SSHClientUser- Overrides:
wantPTY in class SSHClientUserAdaptor
getProxyConnection
public java.net.Socket getProxyConnection()
throws java.io.IOException
- Specified by:
getProxyConnection in interface SSHClientUser- Overrides:
getProxyConnection in class SSHClientUserAdaptor
java.io.IOException