public abstract class AbstractSimpleClientSessionCreator extends AbstractSimpleClient implements ClientSessionCreator
logDEFAULT_AUTHENTICATION_TIMEOUT, DEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSimpleClientSessionCreator() |
protected |
AbstractSimpleClientSessionCreator(long connTimeout,
long authTimeout) |
getSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connectsessionLogin, sessionLogin, sessionLogin, sessionLogin, sessionLogin, sessionLogin, sessionLogin, sessionLoginprotected AbstractSimpleClientSessionCreator()
protected AbstractSimpleClientSessionCreator(long connTimeout,
long authTimeout)
public long getConnectTimeout()
getConnectTimeout in interface SimpleClientConfiguratorpublic void setConnectTimeout(long timeout)
setConnectTimeout in interface SimpleClientConfiguratortimeout - Requested connect timeout (msec.) - always positivepublic long getAuthenticationTimeout()
getAuthenticationTimeout in interface SimpleClientConfiguratorpublic void setAuthenticationTimeout(long timeout)
setAuthenticationTimeout in interface SimpleClientConfiguratortimeout - Requested authentication timeout (msec.) - always positivepublic ClientSession sessionLogin(SocketAddress target, String username, String password) throws IOException
SimpleSessionClientsessionLogin in interface SimpleSessionClienttarget - The target SocketAddressusername - Usernamepassword - PasswordClientSessionIOException - If failed to login or authenticatepublic ClientSession sessionLogin(SocketAddress target, String username, KeyPair identity) throws IOException
SimpleSessionClientsessionLogin in interface SimpleSessionClienttarget - The target SocketAddressusername - Usernameidentity - The KeyPair identityClientSessionIOException - If failed to login or authenticateprotected ClientSession loginSession(ConnectFuture future, String password) throws IOException
IOExceptionprotected ClientSession loginSession(ConnectFuture future, KeyPair identity) throws IOException
IOExceptionprotected ClientSession authSession(ConnectFuture future, String password) throws IOException
IOExceptionprotected ClientSession authSession(ConnectFuture future, KeyPair identity) throws IOException
IOExceptionprotected ClientSession authSession(ClientSession clientSession) throws IOException
IOExceptionpublic static SimpleClient wrap(ClientSessionCreator creator, Channel channel)
ClientSessionCreator into a SimpleClientcreator - The ClientSessionCreator - never nullchannel - 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–2020 The Apache Software Foundation. All rights reserved.