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.session.helpers.AbstractSession.MessageCodingSettingsorg.apache.sshd.common.util.closeable.AbstractCloseable.Stateorg.apache.sshd.client.session.ClientSession.ClientSessionEventsendImmediateClientIdentification, sendImmediateKexInitchannelListenerProxy, channelListeners, clientProposal, clientVersion, currentService, decodeLock, decoderBuffer, decoderLength, decoderState, encodeLock, firstKexPacketFollows, ignorePacketDataLength, ignorePacketsCount, ignorePacketsFrequency, ignorePacketsVariance, inBlocksCount, inBytesCount, inCipher, inCipherSize, inCompression, initialKexDone, initialKexInitSequenceNumber, inMac, inMacResult, inMacSize, inPacketsCount, inSettings, kex, kexFutureHolder, kexHandler, kexInitializedFuture, kexState, lastKeyTimeValue, maxRekeyBlocks, maxRekeyBytes, maxRekeyInterval, maxRekyPackets, negotiationResult, outBlocksCount, outBytesCount, outCipher, outCipherSize, outCompression, outMac, outMacSize, outPacketsCount, outSettings, random, requestLock, seqi, seqo, serverProposal, serverVersion, SESSION, sessionId, sessionListenerProxy, sessionListeners, strictKex, tunnelListenerProxy, tunnelListeners, uncompressBuffer, unmodClientProposal, unmodNegotiationResult, unmodServerProposalauthStart, idleStart, initialKexProposalcloseFuture, futureLock, stateREMOTE_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,
Set<String> allAvailable,
String fromConfig,
String overrideKey)
Modifies a given algorithm list according to a list from the ssh config,
including add ('+'), remove ('-') and reordering ('^') operators.
|
protected String |
resolveAvailableSignaturesProposal(org.apache.sshd.common.FactoryManager manager) |
protected String |
resolveSessionKexProposal(String hostKeyTypes) |
protected org.apache.sshd.common.io.IoWriteFuture |
sendIdentification(String ident,
List<String> extraLines) |
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. |
protected Map<org.apache.sshd.common.kex.KexProposalOption,String> |
setNegotiationResult(Map<org.apache.sshd.common.kex.KexProposalOption,String> guess) |
void |
setProxyHandler(StatefulProxyConnector handler)
Sets a
StatefulProxyConnector to handle proxy connection
protocols. |
auth, exceptionCaught, getMetadataMap, getServices, getSessionState, handleDisconnect, initializeCurrentService, nextServiceName, preClose, sendInitialServiceRequest, signalAuthFailure, signalSessionEvent, switchToNextService, updateCurrentSessionState, waitForaddPasswordIdentity, addPublicKeyIdentity, checkKeys, createChannel, createChannel, createDirectTcpipChannel, createExecChannel, createShellChannel, createSubsystemChannel, getClientProxyConnector, getConnectAddress, getConnectionContext, getConnectionService, getFactoryManager, getForwarder, getHostBasedAuthenticationReporter, getKeyIdentityProvider, getPasswordAuthenticationReporter, getPasswordIdentityProvider, getPublicKeyAuthenticationReporter, getRegisteredIdentities, getServerKey, getServerKeyVerifier, getUserAuthFactories, getUserAuthService, getUserInteraction, initializeKeyExchangePhase, initializeProxyConnector, readIdentification, receiveKexInit, receiveKexInit, removePasswordIdentity, removePublicKeyIdentity, sendClientIdentification, sendKexInit, setClientProxyConnector, setConnectAddress, setHostBasedAuthenticationReporter, setKexSeed, setKeyIdentityProvider, setPasswordAuthenticationReporter, setPasswordIdentityProvider, setPublicKeyAuthenticationReporter, setServerKey, setServerKeyVerifier, setUserAuthFactories, setUserInteraction, signalExtraServerVersionInfo, startDynamicPortForwarding, startLocalPortForwarding, startRemotePortForwarding, startService, stopDynamicPortForwarding, stopLocalPortForwarding, stopRemotePortForwarding, switchToNoneCipheraddChannelListener, addPortForwardingEventListener, addSessionListener, aeadOutgoingBuffer, appendOutgoingMac, attachSession, calculatePadLength, checkRekey, comparePreferredKexProposalOption, createBuffer, decode, determineRekeyBlockLimit, doHandleMessage, doInvokeUnimplementedMessageHandler, doKexNegotiation, doStrictKexProposal, doWritePacket, encode, encryptOutgoingBuffer, failStrictKex, 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, initializeKeyExchangeMessageHandler, isRekeyBlocksCountExceeded, isRekeyDataSizeExceeded, isRekeyPacketCountsExceeded, isRekeyRequired, isRekeyTimeIntervalExceeded, negotiate, notImplemented, prepareBuffer, prepareNewKeys, preProcessEncodeBuffer, receiveKexInit, reExchangeKeys, refreshConfiguration, removeChannelListener, removePortForwardingEventListener, removeSessionListener, removeValue, request, request, requestFailure, requestNewKeysExchange, requestSuccess, resolveIgnoreBufferDataLength, resolveOutputPacket, sendNewKeys, setClientKexData, setInputEncoding, setOutputEncoding, setServerKexData, validateIncomingMac, validateKexState, validateServiceKexState, validateTargetBuffer, writePacket, writePacketattributeKeys, calculateNextIgnorePacketCount, checkAuthenticationTimeout, checkForTimeouts, checkIdleTimeout, clearAttributes, computeAttributeIfAbsent, createProposal, disconnect, doInvokeDebugMessageHandler, doInvokeIgnoreMessageHandler, getAttributesCount, getAuthTimeout, getAuthTimeoutStart, getBoundLocalPortForwards, getBoundRemotePortForward, getChannelStreamWriterResolver, getIdleTimeout, getIdleTimeoutStart, getIoSession, getKexProposal, getLocalForwardsBindings, getProperties, getRemoteForwardsBindings, getReservedSessionMessagesHandler, getSessionDisconnectHandler, getStartedLocalPortForwards, getStartedRemotePortForwards, getTimeoutStatus, getUnknownChannelReferenceHandler, getUsername, handleDebug, handleDisconnect, handleIgnore, handleUnimplemented, invokeSessionSignaller, isAuthenticated, isLocalPortForwardingStartedForPort, isRemotePortForwardingStartedForPort, isServerSession, mergeProposals, removeAttribute, resetAuthTimeout, resetIdleTimeout, resizeKey, resolveAvailableSignaturesProposal, resolveChannelStreamWriterResolver, resolveIdentificationString, resolvePeerAddress, resolveReservedSessionMessagesHandler, resolveUnknownChannelReferenceHandler, sendDebugMessage, sendIgnoreMessage, sendNotImplemented, setAttribute, setAuthenticated, setChannelStreamWriterResolver, setReservedSessionMessagesHandler, setSessionDisconnectHandler, setUnknownChannelReferenceHandler, setUsername, signalDisconnect, signalDisconnect, signalExceptionCaught, signalExceptionCaught, signalNegotiationEnd, signalNegotiationEnd, signalNegotiationOptionsCreated, signalNegotiationOptionsCreated, signalNegotiationStart, signalNegotiationStart, signalPeerIdentificationReceived, signalPeerIdentificationReceived, signalReadPeerIdentificationLine, signalReadPeerIdentificationLine, signalSendIdentification, signalSendIdentification, signalSessionClosed, signalSessionClosed, signalSessionCreated, signalSessionCreated, signalSessionEstablished, signalSessionEstablished, signalSessionEvent, toStringgetCipherFactories, getCompressionFactories, getDelegate, getKexExtensionHandler, getKeyExchangeFactories, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKexExtensionHandler, setKeyExchangeFactories, setMacFactories, setSignatureFactoriesdoCloseGracefully, doCloseImmediatelyaddCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListenerdebug, 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, wait, wait, waitcreateDynamicPortForwardingTracker, createExecChannel, createLocalPortForwardingTracker, createLocalPortForwardingTracker, createRemotePortForwardingTracker, createShellChannel, executeRemoteCommand, executeRemoteCommand, executeRemoteCommand, passwordIteratorOf, providerOf, waitForcreateBuffer, createBuffer, disconnect, getAuthTimeout, getAuthTimeoutStart, getIdleTimeout, getIdleTimeoutStart, getIoSession, getKex, getLocalAddress, getRemoteAddress, getService, getTimeoutStatus, prepareBuffer, reExchangeKeys, request, request, request, request, resetAuthTimeout, resetIdleTimeout, resolveAttribute, resolveAttribute, sendDebugMessage, sendIgnoreMessage, setAuthenticated, writePacket, writePacket, writePacket, writePacketgetCipherInformation, getClientKexProposals, getClientVersion, getCompressionInformation, getKexNegotiationResult, getKexState, getMacInformation, getNegotiatedKexParameter, getServerKexProposals, getServerVersion, getSessionId, isAuthenticated, isDataIntegrityTransport, isSecureSessionTransport, isServerSession, isValidSessionPayloadSize, isValidVersionPrefix, validateSessionPayloadSizedisableSessionHeartbeat, getSessionHeartbeatInterval, getSessionHeartbeatType, setSessionHeartbeat, setSessionHeartbeatgetBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getProperties, getString, getStringProperty, isEmpty, isEmptyclearAttributes, computeAttributeIfAbsent, removeAttribute, setAttributeattributeKeys, getAttributesCount, ofAttributesMap, ofKeyValuePairaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenergetCipherFactories, getCipherFactoriesNameList, getCipherFactoriesNames, getCompressionFactories, getCompressionFactoriesNameList, getCompressionFactoriesNames, getKeyExchangeFactories, getMacFactories, getMacFactoriesNameList, getMacFactoriesNames, setCipherFactories, setCipherFactoriesNameList, setCipherFactoriesNames, setCipherFactoriesNames, setCompressionFactories, setCompressionFactoriesNameList, setCompressionFactoriesNames, setCompressionFactoriesNames, setKeyExchangeFactories, setMacFactories, setMacFactoriesNameList, setMacFactoriesNames, setMacFactoriesNamesgetSignatureFactories, resolveSignatureFactories, setSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNamesgetSignatureFactories, getSignatureFactoriesNameList, getSignatureFactoriesNamesgetKexExtensionHandler, setKexExtensionHandleraddSessionListener, getSessionListenerProxy, removeSessionListenergetReservedSessionMessagesHandler, setReservedSessionMessagesHandlergetSessionDisconnectHandler, setSessionDisconnectHandleraddChannelListener, getChannelListenerProxy, removeChannelListenergetChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolveraddPortForwardingEventListener, getPortForwardingEventListenerProxy, removePortForwardingEventListenergetUnknownChannelReferenceHandler, resolveUnknownChannelReferenceHandler, setUnknownChannelReferenceHandlersetUserAuthFactoriesNamesgetUserAuthFactoriesNameList, getUserAuthFactoriesNames, setUserAuthFactoriesNameList, setUserAuthFactoriesNamesstartLocalPortForwardinggetBoundLocalPortForwards, getBoundRemotePortForward, getLocalForwardsBindings, getRemoteForwardsBindings, getStartedLocalPortForwards, getStartedRemotePortForwards, isLocalPortForwardingStartedForPort, isRemotePortForwardingStartedForPortpublic 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 HostConfigEntrypublic 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, List<String> extraLines) throws Exception
sendIdentification in class org.apache.sshd.common.session.helpers.SessionHelperExceptionprotected byte[] sendKexInit()
throws Exception
sendKexInit in class org.apache.sshd.common.session.helpers.AbstractSessionExceptionpublic void messageReceived(org.apache.sshd.common.util.Readable buffer)
throws Exception
StatefulProxyConnector.messageReceived in class org.apache.sshd.common.session.helpers.AbstractSessionExceptionprotected Map<org.apache.sshd.common.kex.KexProposalOption,String> setNegotiationResult(Map<org.apache.sshd.common.kex.KexProposalOption,String> guess)
setNegotiationResult in class org.apache.sshd.common.session.helpers.AbstractSessionprotected String resolveAvailableSignaturesProposal(org.apache.sshd.common.FactoryManager manager)
resolveAvailableSignaturesProposal in class org.apache.sshd.client.session.AbstractClientSessionprotected String resolveSessionKexProposal(String hostKeyTypes) throws IOException
resolveSessionKexProposal in class org.apache.sshd.common.session.helpers.AbstractSessionIOExceptionpublic List<String> modifyAlgorithmList(List<String> defaultList, Set<String> allAvailable, String fromConfig, String overrideKey)
defaultList - to modifyallAvailable - all available valuesfromConfig - 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.SessionHelperbuffer - 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.AttributeRepositorygetAttribute in class org.apache.sshd.common.session.helpers.SessionHelperpublic org.apache.sshd.common.PropertyResolver getParentPropertyResolver()
getParentPropertyResolver in interface org.apache.sshd.common.PropertyResolvergetParentPropertyResolver in class org.apache.sshd.common.session.helpers.SessionHelperCopyright © 2024 Eclipse JGit Project. All rights reserved.