org.apache.ivy.plugins.repository.ssh
public final class SshCache extends Object
Method Summary | |
---|---|
void | attachChannelSftp(Session session, ChannelSftp channel)
attaches a channelSftp to an existing session cache entry
|
void | clearSession(Session session)
discardes session entries from the cache
|
ChannelSftp | getChannelSftp(Session session)
retrieves an sftp channel from the cache
|
static SshCache | getInstance() |
Session | getSession(String host, int port, String username, String userPassword, File pemFile, String pemPassword, File passFile)
Gets a session from the cache or establishes a new session if necessary
|
Parameters: session to attach the channel to channel channel to attach
Parameters: session to clear
Parameters: session to connect to
Returns: channelSftp or null if not successful (channel not existent or dead)
Parameters: host to connect to port to use for session (-1 == use standard port) username for the session to use userPassword to use for authentication (optional) pemFile File to use for public key authentication pemPassword to use for accessing the pemFile (optional) passFile to store credentials
Returns: session or null if not successful