Package com.sshtools.server
Class TransportProtocolServer
java.lang.Object
com.sshtools.common.ssh.ExecutorOperationSupport<com.sshtools.synergy.ssh.SshContext>
com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
com.sshtools.server.TransportProtocolServer
- All Implemented Interfaces:
com.sshtools.common.nio.IdleStateListener
,com.sshtools.common.sshd.AbstractServerTransport<SshServerContext>
,com.sshtools.synergy.nio.ProtocolEngine
,com.sshtools.synergy.ssh.SshTransport<SshServerContext>
public final class TransportProtocolServer
extends com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
implements com.sshtools.common.sshd.AbstractServerTransport<SshServerContext>
-
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, uuid
Fields inherited from class com.sshtools.common.ssh.ExecutorOperationSupport
CALLBACKS, EVENTS, MESSAGES_INCOMING, MESSAGES_OUTGOING
-
Constructor Summary
ConstructorsConstructorDescriptionTransportProtocolServer
(SshServerContext sshContext, com.sshtools.synergy.nio.ConnectRequestFuture connectFuture) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canConnect
(com.sshtools.synergy.nio.SocketConnection connection) protected boolean
protected void
protected String
getName()
protected void
initializeKeyExchange
(com.sshtools.synergy.ssh.components.SshKeyExchange<SshServerContext> keyExchange, boolean firstPacketFollows, boolean useFirstPacket) protected boolean
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
processNegotiationString
(String value) protected boolean
processTransportMessage
(int msgId, byte[] msg) void
startService
(com.sshtools.common.sshd.Service<SshServerContext> service) Methods inherited from class com.sshtools.synergy.ssh.TransportProtocol
addEventListener, completeKeyExchange, disconnect, generateNewKeysClientIn, generateNewKeysClientOut, generateNewKeysServerIn, generateNewKeysServerOut, getAuthenticatedFuture, getBytes, getCipherCS, getCipherSC, getCompressionCS, getCompressionSC, getConnectFuture, getConnection, 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, kill, onRemoteIdentificationReceived, onSocketClose, onSocketConnect, onSocketRead, onSocketWrite, postMessage, postMessage, processMessage, registerIdleStateListener, removeIdleStateListener, resetIdleState, selectNegotiatedComponent, sendNewKeys, startBinaryProtocol, transferState, wantsToWrite
Methods inherited from class com.sshtools.common.ssh.ExecutorOperationSupport
addIncomingTask, addOutgoingTask, addTask, cleanupOperations
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sshtools.common.sshd.AbstractServerTransport
addTask, disconnect, getConnection, getSessionKey, isConnected, isSelectorThread, postMessage, postMessage, registerIdleStateListener, removeIdleStateListener, resetIdleState, sendNewKeys
-
Constructor Details
-
TransportProtocolServer
public TransportProtocolServer(SshServerContext sshContext, com.sshtools.synergy.nio.ConnectRequestFuture connectFuture) throws com.sshtools.synergy.nio.LicenseException - Throws:
com.sshtools.synergy.nio.LicenseException
-
-
Method Details
-
getContext
- Specified by:
getContext
in interfacecom.sshtools.common.sshd.AbstractServerTransport<SshServerContext>
- Specified by:
getContext
in interfacecom.sshtools.synergy.nio.ProtocolEngine
- Specified by:
getContext
in interfacecom.sshtools.synergy.ssh.SshTransport<SshServerContext>
- Overrides:
getContext
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
processNegotiationString
- Overrides:
processNegotiationString
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
- Throws:
IOException
-
canConnect
protected boolean canConnect(com.sshtools.synergy.nio.SocketConnection connection) - Specified by:
canConnect
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
initializeKeyExchange
protected void initializeKeyExchange(com.sshtools.synergy.ssh.components.SshKeyExchange<SshServerContext> keyExchange, boolean firstPacketFollows, boolean useFirstPacket) throws IOException, com.sshtools.common.ssh.SshException - Specified by:
initializeKeyExchange
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
- Throws:
IOException
com.sshtools.common.ssh.SshException
-
onKeyExchangeInit
protected void onKeyExchangeInit() throws com.sshtools.common.ssh.SshException- Specified by:
onKeyExchangeInit
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
- Throws:
com.sshtools.common.ssh.SshException
-
onKeyExchangeComplete
protected void onKeyExchangeComplete()- Overrides:
onKeyExchangeComplete
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
keyExchangeInitialized
protected void keyExchangeInitialized()- Overrides:
keyExchangeInitialized
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
canSendKeyExchangeInit
protected boolean canSendKeyExchangeInit()- Overrides:
canSendKeyExchangeInit
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
onNewKeysReceived
protected void onNewKeysReceived()- Specified by:
onNewKeysReceived
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
processTransportMessage
- Specified by:
processTransportMessage
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
- Throws:
IOException
-
onNewKeysSent
protected void onNewKeysSent()- Specified by:
onNewKeysSent
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
disconnected
protected void disconnected()- Specified by:
disconnected
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
onConnected
protected void onConnected()- Specified by:
onConnected
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
onDisconnected
protected void onDisconnected()- Specified by:
onDisconnected
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
getName
- Specified by:
getName
in interfacecom.sshtools.synergy.nio.ProtocolEngine
-
startService
- Specified by:
startService
in interfacecom.sshtools.common.sshd.AbstractServerTransport<SshServerContext>
-
getExtensionNegotiationString
- Specified by:
getExtensionNegotiationString
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-
isExtensionNegotiationSupported
protected boolean isExtensionNegotiationSupported()- Specified by:
isExtensionNegotiationSupported
in classcom.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
-