public class JGitClientSession
extends org.apache.sshd.client.session.ClientSessionImpl
ClientSession
that can
be associated with the HostConfigEntry
the session was created for.
The JGitSshClient
creates such sessions and sets this association.
Also provides for associating a JGit CredentialsProvider
with a
session.
org.apache.sshd.common.util.closeable.AbstractCloseable.State
org.apache.sshd.client.session.ClientSession.ClientSessionEvent
authed, authTimeoutStart, channelListenerProxy, channelListeners, clientProposal, clientVersion, currentService, decodeLock, decoderBuffer, decoderLength, decoderState, encodeLock, firstKexPacketFollows, idleTimeoutStart, ignorePacketDataLength, ignorePacketsCount, ignorePacketsFrequency, ignorePacketsVariance, inBlocksCount, inBytesCount, inCipher, inCipherSize, inCompression, inMac, inMacResult, inPacketsCount, 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, username
closeFuture, lock, state
REMOTE_COMMAND_WAIT_EVENTS
DEFAULT_SSH_VERSION_PREFIX, FALLBACK_SSH_VERSION_PREFIX, MAX_VERSION_LINE_LENGTH
NONE
Constructor and Description |
---|
JGitClientSession(org.apache.sshd.client.ClientFactoryManager manager,
org.apache.sshd.common.io.IoSession session) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkKeys() |
CredentialsProvider |
getCredentialsProvider()
Retrieves the
CredentialsProvider set for this session. |
org.apache.sshd.client.config.hosts.HostConfigEntry |
getHostConfigEntry()
Retrieves the
HostConfigEntry this session was created for. |
void |
messageReceived(org.apache.sshd.common.util.Readable buffer)
As long as we're still setting up the proxy connection, diverts messages
to the
StatefulProxyConnector . |
protected String |
resolveAvailableSignaturesProposal(org.apache.sshd.common.FactoryManager manager) |
protected org.apache.sshd.common.io.IoWriteFuture |
sendIdentification(String ident) |
protected byte[] |
sendKexInit() |
void |
setCredentialsProvider(CredentialsProvider provider)
Sets the
CredentialsProvider for this session. |
void |
setHostConfigEntry(org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig)
Sets the
HostConfigEntry this session was created for. |
void |
setProxyHandler(StatefulProxyConnector handler)
Sets a
StatefulProxyConnector to handle proxy connection
protocols. |
auth, exceptionCaught, getMetadataMap, getServices, handleDisconnect, nextServiceName, preClose, sendInitialServiceRequest, signalAuthFailure, signalSessionEvent, switchToNextService, waitFor
addPasswordIdentity, addPublicKeyIdentity, createChannel, createChannel, createDirectTcpipChannel, createExecChannel, createShellChannel, createSubsystemChannel, getClientProxyConnector, getConnectAddress, getConnectionService, getFactoryManager, getForwardingFilter, getPasswordIdentityProvider, getRegisteredIdentities, getServerKeyVerifier, getUserAuthFactories, getUserAuthService, getUserInteraction, readIdentification, receiveKexInit, removePasswordIdentity, removePublicKeyIdentity, sendClientIdentification, sendKexInit, setClientProxyConnector, setConnectAddress, setKexSeed, setPasswordIdentityProvider, setServerKeyVerifier, setUserAuthFactories, setUserInteraction, signalExtraServerVersionInfo, startDynamicPortForwarding, startLocalPortForwarding, startRemotePortForwarding, startService, stopDynamicPortForwarding, stopLocalPortForwarding, stopRemotePortForwarding, switchToNoneCipher
addChannelListener, addPortForwardingEventListener, addSessionListener, attachSession, calculateNextIgnorePacketCount, checkAuthenticationTimeout, checkForTimeouts, checkIdleTimeout, checkRekey, comparePreferredKexProposalOption, createBuffer, createBuffer, createProposal, decode, disconnect, doHandleMessage, doReadIdentification, doWritePacket, encode, getAttribute, getAuthTimeout, getChannelListenerProxy, getChannelStreamPacketWriterResolver, getCipherInformation, getClientKexData, getClientVersion, getCompressionInformation, getIdleTimeout, getInnerCloseable, getIoSession, getKex, getLock, getMacInformation, getNegotiatedKexParameter, getParentPropertyResolver, getPortForwardingEventListenerProxy, getProperties, getReservedSessionMessagesHandler, getServerKexData, getServerVersion, getService, getSession, getSession, getSessionId, getSessionListenerProxy, getTimeoutStatus, getUnknownChannelReferenceHandler, getUsername, handleDebug, handleDisconnect, handleFirstKexPacketFollows, handleIgnore, handleKexInit, handleKexMessage, handleMessage, handleNewKeys, handleServiceAccept, handleServiceAccept, handleServiceRequest, handleServiceRequest, handleUnimplemented, invokeSessionSignaller, isAuthenticated, isRekeyBlocksCountExceeded, isRekeyDataSizeExceeded, isRekeyPacketCountsExceeded, isRekeyRequired, isRekeyTimeIntervalExceeded, mergeProposals, negotiate, notImplemented, prepareBuffer, receiveKexInit, receiveKexInit, receiveNewKeys, reExchangeKeys, refreshConfiguration, removeAttribute, removeChannelListener, removePortForwardingEventListener, removeSessionListener, request, requestFailure, requestNewKeysExchange, requestSuccess, resetIdleTimeout, resizeKey, resolveAttribute, resolveAvailableSignaturesProposal, resolveChannelStreamPacketWriterResolver, resolveIdentificationString, resolveIgnoreBufferDataLength, resolvePeerAddress, resolveReservedSessionMessagesHandler, resolveUnknownChannelReferenceHandler, sendDebugMessage, sendIgnoreMessage, sendNewKeys, sendNotImplemented, sendPendingPackets, setAttribute, setAuthenticated, setChannelStreamPacketWriterResolver, setClientKexData, setNegotiationResult, setReservedSessionMessagesHandler, setServerKexData, setUnknownChannelReferenceHandler, setUsername, signalExceptionCaught, signalExceptionCaught, signalNegotiationEnd, signalNegotiationEnd, signalNegotiationStart, signalNegotiationStart, signalSessionClosed, signalSessionClosed, signalSessionCreated, signalSessionCreated, signalSessionEvent, toString, validateKexState, validateTargetBuffer, writePacket, writePacket
getCipherFactories, getCompressionFactories, getKeyExchangeFactories, getKeyPairProvider, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKeyExchangeFactories, setKeyPairProvider, setMacFactories, setSignatureFactories
doCloseGracefully, doCloseImmediately
addCloseFutureListener, builder, close, isClosed, isClosing, removeCloseFutureListener
getSimplifiedLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createDynamicPortForwardingTracker, createLocalPortForwardingTracker, createRemotePortForwardingTracker, executeRemoteCommand, executeRemoteCommand, executeRemoteCommand
createBuffer, 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
getCipherFactories, getCipherFactoriesNameList, getCipherFactoriesNames, getCompressionFactories, getCompressionFactoriesNameList, getCompressionFactoriesNames, getKeyExchangeFactories, getMacFactories, getMacFactoriesNameList, getMacFactoriesNames, setCipherFactories, setCipherFactoriesNameList, setCipherFactoriesNames, setCipherFactoriesNames, setCompressionFactories, setCompressionFactoriesNameList, setCompressionFactoriesNames, setCompressionFactoriesNames, setKeyExchangeFactories, setMacFactories, setMacFactoriesNameList, setMacFactoriesNames, setMacFactoriesNames
getKeyPairProvider, setKeyPairProvider
getSignatureFactories, getSignatureFactories, getSignatureFactoriesNameList, getSignatureFactoriesNames, resolveSignatureFactories, setSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNames
addSessionListener, getSessionListenerProxy, removeSessionListener
getReservedSessionMessagesHandler, setReservedSessionMessagesHandler
addChannelListener, getChannelListenerProxy, removeChannelListener
getChannelStreamPacketWriterResolver, resolveChannelStreamPacketWriter, resolveChannelStreamPacketWriterResolver, setChannelStreamPacketWriterResolver
addPortForwardingEventListener, getPortForwardingEventListenerProxy, removePortForwardingEventListener
getUnknownChannelReferenceHandler, resolveUnknownChannelReferenceHandler, setUnknownChannelReferenceHandler
getBoolean, getBooleanProperty, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty
getAttribute, removeAttribute, resolveAttribute, resolveAttribute, resolveAttribute, resolveAttribute, setAttribute
public org.apache.sshd.client.config.hosts.HostConfigEntry getHostConfigEntry()
HostConfigEntry
this session was created for.HostConfigEntry
, or null
if none setpublic void setHostConfigEntry(org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig)
HostConfigEntry
this session was created for.hostConfig
- the HostConfigEntry
public void setCredentialsProvider(CredentialsProvider provider)
CredentialsProvider
for this session.provider
- to setpublic CredentialsProvider getCredentialsProvider()
CredentialsProvider
set for this session.null
if none is set.public void setProxyHandler(StatefulProxyConnector handler)
StatefulProxyConnector
to handle proxy connection
protocols.handler
- to setprotected org.apache.sshd.common.io.IoWriteFuture sendIdentification(String ident) throws IOException
sendIdentification
in class org.apache.sshd.common.session.helpers.AbstractSession
IOException
protected byte[] sendKexInit() throws IOException
sendKexInit
in class org.apache.sshd.common.session.helpers.AbstractSession
IOException
public void messageReceived(org.apache.sshd.common.util.Readable buffer) throws Exception
StatefulProxyConnector
.messageReceived
in class org.apache.sshd.common.session.helpers.AbstractSession
Exception
protected void checkKeys() throws org.apache.sshd.common.SshException
checkKeys
in class org.apache.sshd.client.session.AbstractClientSession
org.apache.sshd.common.SshException
protected String resolveAvailableSignaturesProposal(org.apache.sshd.common.FactoryManager manager)
resolveAvailableSignaturesProposal
in class org.apache.sshd.client.session.AbstractClientSession
Copyright © 2020 Eclipse JGit Project. All rights reserved.