public abstract class AbstractSimpleClientSessionCreator extends AbstractSimpleClient implements ClientSessionCreator
logTARGET_SERVERDEFAULT_AUTHENTICATION_TIMEOUT, DEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSimpleClientSessionCreator() |
protected |
AbstractSimpleClientSessionCreator(long connTimeout,
long authTimeout) |
| Modifier and Type | Method and Description |
|---|---|
protected ClientSession |
authSession(ClientSession clientSession) |
protected ClientSession |
authSession(ConnectFuture future,
KeyPair identity) |
protected ClientSession |
authSession(ConnectFuture future,
String password) |
long |
getAuthenticationTimeout() |
long |
getConnectTimeout() |
protected ClientSession |
loginSession(ConnectFuture future,
KeyPair identity) |
protected ClientSession |
loginSession(ConnectFuture future,
String password) |
ClientSession |
sessionLogin(SocketAddress target,
String username,
KeyPair identity)
Creates a session and logs in using the provided credentials
|
ClientSession |
sessionLogin(SocketAddress target,
String username,
String password)
Creates a session and logs in using the provided credentials
|
ClientSession |
sessionLogin(String uri,
KeyPair identity)
Creates a session and logs in using the provided credentials
|
ClientSession |
sessionLogin(String uri,
String password)
Creates a session and logs in using the provided credentials
|
void |
setAuthenticationTimeout(long timeout) |
void |
setConnectTimeout(long timeout) |
static SimpleClient |
wrap(ClientSessionCreator creator,
Channel channel)
Wraps an existing
ClientSessionCreator into a SimpleClient |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnect, connect, 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 authenticatepublic ClientSession sessionLogin(String uri, String password) throws IOException
SimpleSessionClientsessionLogin in interface SimpleSessionClienturi - The target uripassword - PasswordClientSessionIOException - If failed to login or authenticatepublic ClientSession sessionLogin(String uri, KeyPair identity) throws IOException
SimpleSessionClientsessionLogin in interface SimpleSessionClienturi - The target uriidentity - 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–2021 The Apache Software Foundation. All rights reserved.