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

    Constructors
    Constructor
    Description
    TransportProtocolServer(SshServerContext sshContext, com.sshtools.synergy.nio.ConnectRequestFuture connectFuture)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    canConnect(com.sshtools.synergy.nio.SocketConnection connection)
     
    protected boolean
     
    protected void
     
     
    protected String
     
     
    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
     
    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

      public SshServerContext getContext()
      Specified by:
      getContext in interface com.sshtools.common.sshd.AbstractServerTransport<SshServerContext>
      Specified by:
      getContext in interface com.sshtools.synergy.nio.ProtocolEngine
      Specified by:
      getContext in interface com.sshtools.synergy.ssh.SshTransport<SshServerContext>
      Overrides:
      getContext in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • processNegotiationString

      protected void processNegotiationString(String value) throws IOException
      Overrides:
      processNegotiationString in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
      Throws:
      IOException
    • canConnect

      protected boolean canConnect(com.sshtools.synergy.nio.SocketConnection connection)
      Specified by:
      canConnect in class com.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 class com.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 class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
      Throws:
      com.sshtools.common.ssh.SshException
    • onKeyExchangeComplete

      protected void onKeyExchangeComplete()
      Overrides:
      onKeyExchangeComplete in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • keyExchangeInitialized

      protected void keyExchangeInitialized()
      Overrides:
      keyExchangeInitialized in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • canSendKeyExchangeInit

      protected boolean canSendKeyExchangeInit()
      Overrides:
      canSendKeyExchangeInit in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • onNewKeysReceived

      protected void onNewKeysReceived()
      Specified by:
      onNewKeysReceived in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • processTransportMessage

      protected boolean processTransportMessage(int msgId, byte[] msg) throws IOException
      Specified by:
      processTransportMessage in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
      Throws:
      IOException
    • onNewKeysSent

      protected void onNewKeysSent()
      Specified by:
      onNewKeysSent in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • disconnected

      protected void disconnected()
      Specified by:
      disconnected in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • onConnected

      protected void onConnected()
      Specified by:
      onConnected in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • onDisconnected

      protected void onDisconnected()
      Specified by:
      onDisconnected in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • getName

      public String getName()
      Specified by:
      getName in interface com.sshtools.synergy.nio.ProtocolEngine
    • startService

      public void startService(com.sshtools.common.sshd.Service<SshServerContext> service)
      Specified by:
      startService in interface com.sshtools.common.sshd.AbstractServerTransport<SshServerContext>
    • getExtensionNegotiationString

      protected String getExtensionNegotiationString()
      Specified by:
      getExtensionNegotiationString in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>
    • isExtensionNegotiationSupported

      protected boolean isExtensionNegotiationSupported()
      Specified by:
      isExtensionNegotiationSupported in class com.sshtools.synergy.ssh.TransportProtocol<SshServerContext>