public abstract class AbstractSimpleClientSessionCreator extends AbstractSimpleClient implements ClientSessionCreator
log
DEFAULT_AUTHENTICATION_TIMEOUT, DEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT
Modifier | Constructor and Description |
---|---|
protected |
AbstractSimpleClientSessionCreator() |
protected |
AbstractSimpleClientSessionCreator(long connTimeout,
long authTimeout) |
createScpClient, createSftpClient, createSftpClient, scpLogin, scpLogin, scpLogin, scpLogin, scpLogin, scpLogin, scpLogin, scpLogin, scpLogin, scpLogin, sessionLogin, sessionLogin, sessionLogin, sessionLogin, sessionLogin, sessionLogin, sessionLogin, sessionLogin, sftpLogin, sftpLogin, sftpLogin, sftpLogin, sftpLogin, sftpLogin, sftpLogin, sftpLogin, sftpLogin, sftpLogin
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, connect, connect
protected AbstractSimpleClientSessionCreator()
protected AbstractSimpleClientSessionCreator(long connTimeout, long authTimeout)
public long getConnectTimeout()
getConnectTimeout
in interface SimpleClientConfigurator
public void setConnectTimeout(long timeout)
setConnectTimeout
in interface SimpleClientConfigurator
timeout
- Requested connect timeout (msec.) - always positivepublic long getAuthenticationTimeout()
getAuthenticationTimeout
in interface SimpleClientConfigurator
public void setAuthenticationTimeout(long timeout)
setAuthenticationTimeout
in interface SimpleClientConfigurator
timeout
- Requested authentication timeout (msec.) - always positivepublic ClientSession sessionLogin(SocketAddress target, String username, String password) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
target
- The target SocketAddress
username
- Usernamepassword
- PasswordClientSession
IOException
- If failed to login or authenticatepublic ClientSession sessionLogin(SocketAddress target, String username, KeyPair identity) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
target
- The target SocketAddress
username
- Usernameidentity
- The KeyPair
identityClientSession
IOException
- If failed to login or authenticateprotected ClientSession loginSession(ConnectFuture future, String password) throws IOException
IOException
protected ClientSession loginSession(ConnectFuture future, KeyPair identity) throws IOException
IOException
protected ClientSession authSession(ConnectFuture future, String password) throws IOException
IOException
protected ClientSession authSession(ConnectFuture future, KeyPair identity) throws IOException
IOException
protected ClientSession authSession(ClientSession clientSession) throws IOException
IOException
public static SimpleClient wrap(ClientSessionCreator creator, Channel channel)
ClientSessionCreator
into a SimpleClient
creator
- The ClientSessionCreator
- never null
channel
- The Channel
representing the creator for
relaying Channel.isOpen()
and Channel.close()
callsSimpleClient
wrapper. Note: closing the wrapper
also closes the underlying sessions creator.Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.