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.
Modifier and Type | Class and Description |
---|---|
static class |
JGitClientSession.ChainingAttributes
An
AttributeRepository that chains together two other attribute
sources in a hierarchy. |
static class |
JGitClientSession.SessionAttributes
A
JGitClientSession.ChainingAttributes repository that doubles as a
PropertyResolver . |
org.apache.sshd.common.util.closeable.AbstractCloseable.State
org.apache.sshd.client.session.ClientSession.ClientSessionEvent
sendImmediateClientIdentification, sendImmediateKexInit
channelListenerProxy, channelListeners, clientProposal, clientVersion, currentService, decodeLock, decoderBuffer, decoderLength, decoderState, encodeLock, firstKexPacketFollows, globalRequestSeqo, ignorePacketDataLength, ignorePacketsCount, ignorePacketsFrequency, ignorePacketsVariance, inBlocksCount, inBytesCount, inCipher, inCipherSize, inCompression, inMac, inMacResult, inMacSize, inPacketsCount, kex, kexFutureHolder, kexState, lastKeyTimeValue, maxRekeyBlocks, maxRekeyBytes, maxRekeyInterval, maxRekyPackets, negotiationResult, outBlocksCount, outBytesCount, outCipher, outCipherSize, outCompression, outMac, outMacSize, outPacketsCount, pendingGlobalRequest, pendingPackets, random, requestLock, seqi, seqo, serverProposal, serverVersion, SESSION, sessionId, sessionListenerProxy, sessionListeners, tunnelListenerProxy, tunnelListeners, uncompressBuffer, unmodClientProposal, unmodNegotiationResult, unmodServerProposal
authStart, idleStart, sessionLock
closeFuture, futureLock, state
REMOTE_COMMAND_WAIT_EVENTS
Constructor and Description |
---|
JGitClientSession(org.apache.sshd.client.ClientFactoryManager manager,
org.apache.sshd.common.io.IoSession session) |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
doReadIdentification(org.apache.sshd.common.util.buffer.Buffer buffer,
boolean server)
Reads the RFC 4253, section 4.2 protocol version identification.
|
<T> T |
getAttribute(org.apache.sshd.common.AttributeRepository.AttributeKey<T> key) |
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. |
org.apache.sshd.common.PropertyResolver |
getParentPropertyResolver() |
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 . |
List<String> |
modifyAlgorithmList(List<String> defaultList,
String fromConfig,
String overrideKey)
Modifies a given algorithm list according to a list from the ssh config,
including remove ('-') and reordering ('^') operators.
|
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, getSessionState, handleDisconnect, nextServiceName, preClose, sendInitialServiceRequest, signalAuthFailure, signalSessionEvent, switchToNextService, updateCurrentSessionState, waitFor
addPasswordIdentity, addPublicKeyIdentity, checkKeys, createChannel, createChannel, createDirectTcpipChannel, createExecChannel, createShellChannel, createSubsystemChannel, getClientProxyConnector, getConnectAddress, getConnectionContext, getConnectionService, getFactoryManager, getForwarder, getKeyIdentityProvider, getPasswordIdentityProvider, getRegisteredIdentities, getServerKey, getServerKeyVerifier, getUserAuthFactories, getUserAuthService, getUserInteraction, initializeKeyExchangePhase, initializeProxyConnector, readIdentification, receiveKexInit, receiveKexInit, removePasswordIdentity, removePublicKeyIdentity, sendClientIdentification, sendKexInit, setClientProxyConnector, setConnectAddress, setKexSeed, setKeyIdentityProvider, setPasswordIdentityProvider, setServerKey, setServerKeyVerifier, setUserAuthFactories, setUserInteraction, signalExtraServerVersionInfo, startDynamicPortForwarding, startLocalPortForwarding, startRemotePortForwarding, startService, stopDynamicPortForwarding, stopLocalPortForwarding, stopRemotePortForwarding, switchToNoneCipher
addChannelListener, addPortForwardingEventListener, addSessionListener, aeadOutgoingBuffer, appendOutgoingMac, attachSession, calculatePadLength, checkRekey, comparePreferredKexProposalOption, createBuffer, decode, doHandleMessage, doInvokeUnimplementedMessageHandler, doKexNegotiation, doWritePacket, encode, encryptOutgoingBuffer, enqueuePendingPacket, getChannelListenerProxy, getCipherInformation, getClientKexData, getClientKexProposals, getClientVersion, getCompressionInformation, getInnerCloseable, getKex, getKexNegotiationResult, getKexState, getMacInformation, getNegotiatedKexParameter, getPortForwardingEventListenerProxy, getServerKexData, getServerKexProposals, getServerVersion, getService, getSession, getSession, getSessionId, getSessionListenerProxy, handleFirstKexPacketFollows, handleKexExtension, handleKexInit, handleKexMessage, handleMessage, handleNewCompression, handleNewKeys, handleServiceAccept, handleServiceAccept, handleServiceRequest, handleServiceRequest, isRekeyBlocksCountExceeded, isRekeyDataSizeExceeded, isRekeyPacketCountsExceeded, isRekeyRequired, isRekeyTimeIntervalExceeded, negotiate, notImplemented, prepareBuffer, preProcessEncodeBuffer, receiveKexInit, receiveNewKeys, reExchangeKeys, refreshConfiguration, removeChannelListener, removePortForwardingEventListener, removeSessionListener, request, requestFailure, requestNewKeysExchange, requestSuccess, resolveAvailableSignaturesProposal, resolveIgnoreBufferDataLength, resolveOutputPacket, resolveSessionKexProposal, sendNewKeys, sendPendingPackets, setClientKexData, setNegotiationResult, setServerKexData, signalRequestFailure, validateIncomingMac, validateKexState, validateTargetBuffer, writePacket
attributeKeys, calculateNextIgnorePacketCount, checkAuthenticationTimeout, checkForTimeouts, checkIdleTimeout, clearAttributes, computeAttributeIfAbsent, createProposal, disconnect, doInvokeDebugMessageHandler, doInvokeIgnoreMessageHandler, getAttributesCount, getAuthTimeout, getAuthTimeoutStart, getBoundLocalPortForwards, getBoundRemotePortForward, getChannelStreamWriterResolver, getIdleTimeout, getIdleTimeoutStart, getIoSession, getLocalForwardsBindings, getProperties, getRemoteForwardsBindings, getReservedSessionMessagesHandler, getSessionDisconnectHandler, getStartedLocalPortForwards, getStartedRemotePortForwards, getTimeoutStatus, getUnknownChannelReferenceHandler, getUsername, handleDebug, handleDisconnect, handleIgnore, handleUnimplemented, invokeSessionSignaller, isAuthenticated, isLocalPortForwardingStartedForPort, isRemotePortForwardingStartedForPort, isServerSession, mergeProposals, removeAttribute, resetAuthTimeout, resetIdleTimeout, resizeKey, resolveChannelStreamWriterResolver, resolveIdentificationString, resolvePeerAddress, resolveReservedSessionMessagesHandler, resolveUnknownChannelReferenceHandler, sendDebugMessage, sendIgnoreMessage, sendNotImplemented, setAttribute, setAuthenticated, setChannelStreamWriterResolver, setReservedSessionMessagesHandler, setSessionDisconnectHandler, setUnknownChannelReferenceHandler, setUsername, signalDisconnect, signalDisconnect, signalExceptionCaught, signalExceptionCaught, signalNegotiationEnd, signalNegotiationEnd, signalNegotiationStart, signalNegotiationStart, signalPeerIdentificationReceived, signalPeerIdentificationReceived, signalSessionClosed, signalSessionClosed, signalSessionCreated, signalSessionCreated, signalSessionEstablished, signalSessionEstablished, signalSessionEvent, toString, writePacket
getCipherFactories, getCompressionFactories, getDelegate, getKexExtensionHandler, getKeyExchangeFactories, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKexExtensionHandler, setKeyExchangeFactories, setMacFactories, setSignatureFactories
doCloseGracefully, doCloseImmediately
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListener
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createDynamicPortForwardingTracker, createExecChannel, createLocalPortForwardingTracker, createLocalPortForwardingTracker, createRemotePortForwardingTracker, createShellChannel, executeRemoteCommand, executeRemoteCommand, executeRemoteCommand, passwordIteratorOf, providerOf, waitFor
createBuffer, createBuffer, disconnect, getAuthTimeout, getAuthTimeoutStart, getIdleTimeout, getIdleTimeoutStart, getIoSession, getKex, getLocalAddress, getRemoteAddress, getService, getTimeoutStatus, prepareBuffer, reExchangeKeys, request, request, request, resetAuthTimeout, resetIdleTimeout, resolveAttribute, resolveAttribute, sendDebugMessage, sendIgnoreMessage, setAuthenticated, writePacket, writePacket, writePacket, writePacket
getCipherInformation, getClientKexProposals, getClientVersion, getCompressionInformation, getKexNegotiationResult, getKexState, getMacInformation, getNegotiatedKexParameter, getServerKexProposals, getServerVersion, getSessionId, isAuthenticated, isDataIntegrityTransport, isSecureSessionTransport, isServerSession, isValidVersionPrefix
disableSessionHeartbeat, getSessionHeartbeatInterval, getSessionHeartbeatType, setSessionHeartbeat, setSessionHeartbeat
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getProperties, getString, getStringProperty
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttribute
attributeKeys, getAttributesCount, ofAttributesMap, ofKeyValuePair
addCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListener
getCipherFactories, getCipherFactoriesNameList, getCipherFactoriesNames, getCompressionFactories, getCompressionFactoriesNameList, getCompressionFactoriesNames, getKeyExchangeFactories, getMacFactories, getMacFactoriesNameList, getMacFactoriesNames, setCipherFactories, setCipherFactoriesNameList, setCipherFactoriesNames, setCipherFactoriesNames, setCompressionFactories, setCompressionFactoriesNameList, setCompressionFactoriesNames, setCompressionFactoriesNames, setKeyExchangeFactories, setMacFactories, setMacFactoriesNameList, setMacFactoriesNames, setMacFactoriesNames
getSignatureFactories, resolveSignatureFactories, setSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNames
getSignatureFactories, getSignatureFactoriesNameList, getSignatureFactoriesNames
getKexExtensionHandler, setKexExtensionHandler
addSessionListener, getSessionListenerProxy, removeSessionListener
getReservedSessionMessagesHandler, setReservedSessionMessagesHandler
getSessionDisconnectHandler, setSessionDisconnectHandler
addChannelListener, getChannelListenerProxy, removeChannelListener
getChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolver
addPortForwardingEventListener, getPortForwardingEventListenerProxy, removePortForwardingEventListener
getUnknownChannelReferenceHandler, resolveUnknownChannelReferenceHandler, setUnknownChannelReferenceHandler
setUserAuthFactoriesNames
getUserAuthFactoriesNameList, getUserAuthFactoriesNames, setUserAuthFactoriesNameList, setUserAuthFactoriesNames
startLocalPortForwarding
getBoundLocalPortForwards, getBoundRemotePortForward, getLocalForwardsBindings, getRemoteForwardsBindings, getStartedLocalPortForwards, getStartedRemotePortForwards, isLocalPortForwardingStartedForPort, isRemotePortForwardingStartedForPort
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.SessionHelper
IOException
protected byte[] sendKexInit() throws IOException, GeneralSecurityException
sendKexInit
in class org.apache.sshd.common.session.helpers.AbstractSession
IOException
GeneralSecurityException
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 String resolveAvailableSignaturesProposal(org.apache.sshd.common.FactoryManager manager)
resolveAvailableSignaturesProposal
in class org.apache.sshd.client.session.AbstractClientSession
public List<String> modifyAlgorithmList(List<String> defaultList, String fromConfig, String overrideKey)
defaultList
- to modifyfromConfig
- telling how to modify the defaultList
, must not be
null
or emptyoverrideKey
- ssh config key; used for loggingnull
if overrideKey
is not
setprotected List<String> doReadIdentification(org.apache.sshd.common.util.buffer.Buffer buffer, boolean server) throws StreamCorruptedException
doReadIdentification
in class org.apache.sshd.common.session.helpers.SessionHelper
buffer
- to read fromserver
- whether we're an SSH server (should always be false
)null
if no identification line was found and more bytes
are neededStreamCorruptedException
- if the identification is malformedpublic <T> T getAttribute(org.apache.sshd.common.AttributeRepository.AttributeKey<T> key)
getAttribute
in interface org.apache.sshd.common.AttributeRepository
getAttribute
in class org.apache.sshd.common.session.helpers.SessionHelper
public org.apache.sshd.common.PropertyResolver getParentPropertyResolver()
getParentPropertyResolver
in interface org.apache.sshd.common.PropertyResolver
getParentPropertyResolver
in class org.apache.sshd.common.session.helpers.SessionHelper
Copyright © 2021 Eclipse JGit Project. All rights reserved.