public class SSHClientPool extends Object
retrieveSSHClient() to retrieve a
SSHClient and, after done with it, call the method
returnSSHClient(SSHClient) to put the SSHClient back into the pool.| Constructor and Description |
|---|
SSHClientPool(String sshHost,
int sshPort,
String sshUserName,
String sshUserPass,
String sshUserPrivKey,
boolean isTunnelEnable,
String sshTunnelHost,
int sshTunnelPort,
String sshTunnelUser,
String sshTunnelPass,
String sshTunnelPrivKey,
int sshTunnelLocalPort,
int sshTunnelLocalPortRange)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected csbase.sshclient.SSHClient |
retrieveSSHClient()
Retrieves a SSHClient from the pool.
|
protected void |
returnSSHClient(csbase.sshclient.SSHClient sshClient)
Returns a SSHClient to the pool.
|
public SSHClientPool(String sshHost, int sshPort, String sshUserName, String sshUserPass, String sshUserPrivKey, boolean isTunnelEnable, String sshTunnelHost, int sshTunnelPort, String sshTunnelUser, String sshTunnelPass, String sshTunnelPrivKey, int sshTunnelLocalPort, int sshTunnelLocalPortRange)
sshHost - hostsshPort - portsshUserName - usernamesshUserPass - password (optional if sshUserPrivKey is provided)sshUserPrivKey - private key (optional if sshUserPass is provided)isTunnelEnable - to indicate that a tunnel must be createdsshTunnelHost - host of the tunnelsshTunnelPort - port of the tunnelsshTunnelUser - username of the tunnelsshTunnelPass - password of the tunnel (optional if sshTunnelPrivKey is provided)sshTunnelPrivKey - private key of the tunnel (optional if sshTunnelPass is provided)sshTunnelLocalPort - local port of the tunnelsshTunnelLocalPortRange - local port range of the tunnelprotected csbase.sshclient.SSHClient retrieveSSHClient()
throws csbase.sshclient.SSHClientException
csbase.sshclient.SSHClientException - if there is a error creating a new SSHClientprotected void returnSSHClient(csbase.sshclient.SSHClient sshClient)
sshClient - the SSHClient returnedCopyright © 2016. All rights reserved.