public class ClientSessionImpl extends AbstractClientSession
ClientSessionAbstractCloseable.StateClientSession.ClientSessionEventSession.TimeoutStatusAttributeStore.AttributeKey<T>authed, authTimeoutStart, channelListenerProxy, channelListeners, clientProposal, clientVersion, currentService, decodeLock, decoderBuffer, decoderLength, decoderState, encodeLock, firstKexPacketFollows, i_c, i_s, idleTimeoutStart, ignorePacketDataLength, ignorePacketsCount, ignorePacketsFrequency, ignorePacketsVariance, inBlocksCount, inBytesCount, inCipher, inCipherSize, inCompression, inMac, inMacResult, inPacketsCount, ioSession, isServer, kex, kexFutureHolder, kexState, lastKeyTimeValue, maxRekeyBlocks, maxRekeyBytes, maxRekeyInterval, maxRekyPackets, negotiationResult, outBlocksCount, outBytesCount, outCipher, outCipherSize, outCompression, outMac, outPacketsCount, pendingPackets, random, requestLock, seqi, seqo, serverProposal, serverVersion, SESSION, sessionId, sessionListenerProxy, sessionListeners, timeoutStatus, tunnelListenerProxy, tunnelListeners, uncompressBuffer, usernamecloseFuture, lock, statelogREMOTE_COMMAND_WAIT_EVENTSDEFAULT_SSH_VERSION_PREFIX, FALLBACK_SSH_VERSION_PREFIX, MAX_VERSION_LINE_LENGTHEMPTYCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUTDEFAULT_PASSWORD_PROMPTS, PASSWORD_PROMPTS, PREFERRED_AUTHS| Constructor and Description |
|---|
ClientSessionImpl(ClientFactoryManager client,
IoSession ioSession) |
| Modifier and Type | Method and Description |
|---|---|
AuthFuture |
auth()
Starts the authentication process.
|
void |
exceptionCaught(Throwable t)
Handle any exceptions that occurred on this session.
|
Map<Object,Object> |
getMetadataMap()
Access to the metadata.
|
protected List<Service> |
getServices() |
protected void |
handleDisconnect(int code,
String msg,
String lang,
Buffer buffer) |
protected String |
nextServiceName() |
protected void |
preClose()
preClose is guaranteed to be called before doCloseGracefully or doCloseImmediately.
|
protected void |
sendInitialServiceRequest() |
protected void |
signalAuthFailure(AuthFuture future,
Throwable t) |
protected void |
signalSessionEvent(SessionListener.Event event)
Sends a session event to all currently registered session listeners
|
void |
switchToNextService() |
Set<ClientSession.ClientSessionEvent> |
waitFor(Collection<ClientSession.ClientSessionEvent> mask,
long timeout)
Wait for any one of a specific state to be signaled.
|
addPasswordIdentity, addPublicKeyIdentity, checkKeys, createChannel, createChannel, createDirectTcpipChannel, createExecChannel, createScpClient, createSftpClient, createSftpFileSystem, createSftpFileSystem, createSftpFileSystem, createSftpFileSystem, createSftpFileSystem, createSftpFileSystem, createShellChannel, createSubsystemChannel, getClientProxyConnector, getConnectAddress, getConnectionService, getFactoryManager, getPasswordIdentityProvider, getRegisteredIdentities, getScpFileOpener, getScpTransferEventListener, getServerKeyVerifier, getTcpipForwarder, getUserAuthFactories, getUserAuthService, getUserInteraction, readIdentification, receiveKexInit, removePasswordIdentity, removePublicKeyIdentity, resolveAvailableSignaturesProposal, sendClientIdentification, sendKexInit, setClientProxyConnector, setConnectAddress, setKexSeed, setPasswordIdentityProvider, setScpFileOpener, setScpTransferEventListener, setServerKeyVerifier, setUserAuthFactories, setUserInteraction, signalExtraServerVersionInfo, startDynamicPortForwarding, startLocalPortForwarding, startRemotePortForwarding, startService, stopDynamicPortForwarding, stopLocalPortForwarding, stopRemotePortForwarding, switchToNoneCipheraddChannelListener, addPortForwardingEventListener, addSessionListener, attachSession, calculateNextIgnorePacketCount, checkAuthenticationTimeout, checkForTimeouts, checkIdleTimeout, checkRekey, comparePreferredKexProposalOption, createBuffer, createBuffer, createProposal, decode, disconnect, doHandleMessage, doReadIdentification, doWritePacket, encode, getAttribute, getAuthTimeout, getChannelListenerProxy, getCipherInformation, getClientVersion, getCompressionInformation, getIdleTimeout, getInnerCloseable, getIoSession, getKex, getLock, getMacInformation, getNegotiatedKexParameter, getParentPropertyResolver, getPortForwardingEventListenerProxy, getProperties, getReservedSessionMessagesHandler, getServerVersion, getService, getSession, getSession, getSessionId, getSessionListenerProxy, getTimeoutStatus, getUsername, handleDebug, handleDisconnect, handleFirstKexPacketFollows, handleIgnore, handleKexInit, handleKexMessage, handleMessage, handleNewKeys, handleServiceAccept, handleServiceAccept, handleServiceRequest, handleServiceRequest, handleUnimplemented, invokeSessionSignaller, isAuthenticated, isRekeyBlocksCountExceeded, isRekeyDataSizeExceeded, isRekeyPacketCountsExceeded, isRekeyRequired, isRekeyTimeIntervalExceeded, mergeProposals, messageReceived, negotiate, notImplemented, prepareBuffer, receiveKexInit, receiveKexInit, receiveNewKeys, reExchangeKeys, refreshConfiguration, removeAttribute, removeChannelListener, removePortForwardingEventListener, removeSessionListener, request, requestFailure, requestNewKeysExchange, requestSuccess, resetIdleTimeout, resizeKey, resolveAttribute, resolveAvailableSignaturesProposal, resolveIdentificationString, resolveIgnoreBufferDataLength, resolvePeerAddress, resolveReservedSessionMessagesHandler, sendDebugMessage, sendIdentification, sendIgnoreMessage, sendKexInit, sendNewKeys, sendNotImplemented, setAttribute, setAuthenticated, setNegotiationResult, setReservedSessionMessagesHandler, setUsername, signalExceptionCaught, signalExceptionCaught, signalNegotiationEnd, signalNegotiationEnd, signalNegotiationStart, signalNegotiationStart, signalSessionClosed, signalSessionClosed, signalSessionCreated, signalSessionCreated, signalSessionEvent, toString, validateKexState, validateTargetBuffer, writePacket, writePacketgetCipherFactories, getCompressionFactories, getKeyExchangeFactories, getKeyPairProvider, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKeyExchangeFactories, setKeyPairProvider, setMacFactories, setSignatureFactoriesdoCloseGracefully, doCloseImmediatelyaddCloseFutureListener, builder, close, isClosed, isClosing, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateDynamicPortForwardingTracker, createLocalPortForwardingTracker, createRemotePortForwardingTracker, executeRemoteCommand, executeRemoteCommandcreateBuffer, createBuffer, disconnect, getAuthTimeout, getCipherInformation, getClientVersion, getCompressionInformation, getIdleTimeout, getIoSession, getKex, getMacInformation, getNegotiatedKexParameter, getServerVersion, getService, getSessionId, getTimeoutStatus, isAuthenticated, isValidVersionPrefix, prepareBuffer, reExchangeKeys, request, resetIdleTimeout, sendDebugMessage, sendIgnoreMessage, setAuthenticated, writePacket, writePacketgetCipherFactories, getCipherFactoriesNameList, getCipherFactoriesNames, getCompressionFactories, getCompressionFactoriesNameList, getCompressionFactoriesNames, getKeyExchangeFactories, getMacFactories, getMacFactoriesNameList, getMacFactoriesNames, setCipherFactories, setCipherFactoriesNameList, setCipherFactoriesNames, setCipherFactoriesNames, setCompressionFactories, setCompressionFactoriesNameList, setCompressionFactoriesNames, setCompressionFactoriesNames, setKeyExchangeFactories, setMacFactories, setMacFactoriesNameList, setMacFactoriesNames, setMacFactoriesNamesgetKeyPairProvider, setKeyPairProvidergetSignatureFactories, getSignatureFactories, getSignatureFactoriesNameList, getSignatureFactoriesNames, resolveSignatureFactories, setSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNamesaddSessionListener, getSessionListenerProxy, removeSessionListenergetReservedSessionMessagesHandler, setReservedSessionMessagesHandleraddChannelListener, getChannelListenerProxy, removeChannelListeneraddPortForwardingEventListener, getPortForwardingEventListenerProxy, removePortForwardingEventListenergetBoolean, getBooleanProperty, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringPropertygetAttribute, removeAttribute, resolveAttribute, resolveAttribute, resolveAttribute, resolveAttribute, setAttributeaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenersetUsernamegetUsernamecreateScpClient, createScpClient, createScpClientcreateSftpClient, createSftpClientgetUserAuthFactoriesNameList, getUserAuthFactoriesNames, setUserAuthFactoriesNameList, setUserAuthFactoriesNames, setUserAuthFactoriesNamespublic ClientSessionImpl(ClientFactoryManager client, IoSession ioSession) throws Exception
Exceptionprotected List<Service> getServices()
getServices in class AbstractSessionpublic AuthFuture auth() throws IOException
ClientSessionClientAuthenticationManager.addPasswordIdentity(String) or ClientAuthenticationManager.addPublicKeyIdentity(java.security.KeyPair).IOException - if failed to generate the futureClientAuthenticationManager.addPasswordIdentity(String),
ClientAuthenticationManager.addPublicKeyIdentity(java.security.KeyPair)public void exceptionCaught(Throwable t)
AbstractSessionSshException.exceptionCaught in interface SessionexceptionCaught in class AbstractSessiont - the exception to processprotected void preClose()
AbstractCloseablepreClose in class AbstractSessionprotected void handleDisconnect(int code,
String msg,
String lang,
Buffer buffer)
throws Exception
handleDisconnect in class AbstractSessionExceptionprotected void signalAuthFailure(AuthFuture future, Throwable t)
protected String nextServiceName()
public void switchToNextService()
throws IOException
IOExceptionprotected void signalSessionEvent(SessionListener.Event event) throws IOException
AbstractSessionsignalSessionEvent in class AbstractSessionevent - The event to sendIOException - If any of the registered listeners threw an exception.protected void sendInitialServiceRequest()
throws IOException
IOExceptionpublic Set<ClientSession.ClientSessionEvent> waitFor(Collection<ClientSession.ClientSessionEvent> mask, long timeout)
ClientSessionmask - The request ClientSession.ClientSessionEvents masktimeout - Wait time in milliseconds - non-positive means foreverClientSession.ClientSessionEvent.TIMEOUT
value is set)public Map<Object,Object> getMetadataMap()
ClientSessionMapCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.