Package com.sshtools.client
Class TransportProtocolClient
java.lang.Object
com.sshtools.common.ssh.ExecutorOperationSupport<SshContext>
com.sshtools.synergy.ssh.TransportProtocol<SshClientContext>
com.sshtools.client.TransportProtocolClient
- All Implemented Interfaces:
IdleStateListener,ProtocolEngine,SshTransport<SshClientContext>
The implementation of the client side of the SSH transport protocol.
-
Field Summary
Fields inherited from class com.sshtools.synergy.ssh.TransportProtocol
activeService, AUTH_CANCELLED_BY_USER, BY_APPLICATION, CHARSET_ENCODING, cipherCS, cipherSC, completedFirstKeyExchange, COMPRESSION_ERROR, compressionCS, compressionSC, con, CONNECTED, CONNECTION_LOST, DISCONNECTED, disconnectStarted, enableExtensionCapability, hasExtensionCapability, HOST_KEY_NOT_VERIFIABLE, HOST_NOT_ALLOWED, hostKey, ILLEGAL_USER_NAME, KEY_EXCHANGE_FAILED, keyExchangeAlgorithm, localIdentification, localkex, lock, MAC_ERROR, macCS, macSC, NEGOTIATING_PROTOCOL, NO_MORE_AUTH_METHODS_AVAILABLE, PERFORMING_KEYEXCHANGE, PROTOCOL_ERROR, PROTOCOL_VERSION_NOT_SUPPORTED, publicKey, receivedRemoteIdentification, remoteIdentification, remotekex, RESERVED, sentLocalIdentification, SERVICE_NOT_AVAILABLE, sessionIdentifier, socketConnection, SSH_MSG_EXT_INFO, SSH_MSG_SERVICE_ACCEPT, SSH_MSG_SERVICE_REQUEST, sshContext, TOO_MANY_CONNECTIONS, uuidFields inherited from class com.sshtools.common.ssh.ExecutorOperationSupport
CALLBACKS, EVENTS, MESSAGES_INCOMING, MESSAGES_OUTGOING -
Constructor Summary
ConstructorsConstructorDescriptionTransportProtocolClient(SshClientContext sshContext, ConnectRequestFuture connectFuture) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanConnect(SocketConnection connection) protected voidcompleteKeyExchange(SshKeyExchange<SshClientContext> keyExchange) protected voidprotected StringgetName()protected voidinitializeKeyExchange(SshKeyExchange<SshClientContext> keyExchange, boolean firstPacketFollows, boolean useFirstPacket) protected booleanprotected booleanprotected voidprotected voidprotected voidprotected voidprotected voidbooleanonSocketRead(ByteBuffer incomingData) protected booleanprocessTransportMessage(int msgid, byte[] msg) protected StringselectNegotiatedComponent(String remotelist, String locallist) voidsetActiveService(Service service) voidstartService(Service service) Methods inherited from class com.sshtools.synergy.ssh.TransportProtocol
addEventListener, canSendKeyExchangeInit, disconnect, generateNewKeysClientIn, generateNewKeysClientOut, generateNewKeysServerIn, generateNewKeysServerOut, getAuthenticatedFuture, getBytes, getCipherCS, getCipherSC, getCompressionCS, getCompressionSC, getConnectFuture, getConnection, getContext, getDisconnectFuture, getExecutor, getHostKey, getHostKeyAlgorithm, getHostKeyInUse, getKeyExchangeAlgorithm, getKeyExchangeInUse, getLocalAddress, getLocalIdentification, getLocalPort, getMacCS, getMacSC, getQueueSizes, getRemoteAddress, getRemoteCiphersCS, getRemoteCiphersSC, getRemoteCompressionsCS, getRemoteCompressionsSC, getRemoteIdentification, getRemoteKeyExchanges, getRemoteMacsCS, getRemoteMacsSC, getRemotePort, getRemotePublicKeys, getRND, getSessionKey, getSocketConnection, getSshContext, getState, getUUID, hasCompletedKeyExchange, idle, isConnected, isDisonnecting, isSelectorThread, keyExchangeInitialized, kill, onKeyExchangeComplete, onRemoteIdentificationReceived, onSocketClose, onSocketConnect, onSocketWrite, postMessage, postMessage, processMessage, processNegotiationString, registerIdleStateListener, removeIdleStateListener, resetIdleState, sendNewKeys, startBinaryProtocol, transferState, wantsToWriteMethods inherited from class com.sshtools.common.ssh.ExecutorOperationSupport
addIncomingTask, addOutgoingTask, addTask, cleanupOperations
-
Constructor Details
-
TransportProtocolClient
public TransportProtocolClient(SshClientContext sshContext, ConnectRequestFuture connectFuture) throws LicenseException - Throws:
LicenseException
-
-
Method Details
-
canConnect
- Specified by:
canConnectin classTransportProtocol<SshClientContext>
-
onSocketRead
- Specified by:
onSocketReadin interfaceProtocolEngine- Overrides:
onSocketReadin classTransportProtocol<SshClientContext>
-
initializeKeyExchange
protected void initializeKeyExchange(SshKeyExchange<SshClientContext> keyExchange, boolean firstPacketFollows, boolean useFirstPacket) throws IOException, SshException - Specified by:
initializeKeyExchangein classTransportProtocol<SshClientContext>- Throws:
IOExceptionSshException
-
onKeyExchangeInit
protected void onKeyExchangeInit()- Specified by:
onKeyExchangeInitin classTransportProtocol<SshClientContext>
-
completeKeyExchange
- Overrides:
completeKeyExchangein classTransportProtocol<SshClientContext>
-
onNewKeysReceived
protected void onNewKeysReceived()- Specified by:
onNewKeysReceivedin classTransportProtocol<SshClientContext>
-
onNewKeysSent
protected void onNewKeysSent()- Specified by:
onNewKeysSentin classTransportProtocol<SshClientContext>
-
selectNegotiatedComponent
- Overrides:
selectNegotiatedComponentin classTransportProtocol<SshClientContext>- Throws:
IOException
-
processTransportMessage
- Specified by:
processTransportMessagein classTransportProtocol<SshClientContext>- Throws:
IOExceptionSshException
-
setActiveService
-
getActiveService
-
startService
-
disconnected
protected void disconnected()- Specified by:
disconnectedin classTransportProtocol<SshClientContext>
-
onConnected
protected void onConnected()- Specified by:
onConnectedin classTransportProtocol<SshClientContext>
-
onDisconnected
protected void onDisconnected()- Specified by:
onDisconnectedin classTransportProtocol<SshClientContext>
-
getName
-
getExtensionNegotiationString
- Specified by:
getExtensionNegotiationStringin classTransportProtocol<SshClientContext>
-
isExtensionNegotiationSupported
protected boolean isExtensionNegotiationSupported()- Specified by:
isExtensionNegotiationSupportedin classTransportProtocol<SshClientContext>
-
isServerMode
protected boolean isServerMode()- Specified by:
isServerModein classTransportProtocol<SshClientContext>
-