Class ReservedSessionMessagesHandlerAdapter

    • Constructor Detail

      • ReservedSessionMessagesHandlerAdapter

        public ReservedSessionMessagesHandlerAdapter()
    • Method Detail

      • sendIdentification

        public IoWriteFuture sendIdentification​(Session session,
                                                java.lang.String version,
                                                java.util.List<java.lang.String> extraLines)
                                         throws java.lang.Exception
        Description copied from interface: ReservedSessionMessagesHandler
        Send the initial version exchange identification in and independent manner
        Specified by:
        sendIdentification in interface ReservedSessionMessagesHandler
        Parameters:
        session - The Session through which the version is exchange is being managed
        version - The version line that was resolved - Note: since this string is part of the KEX and is cached in the calling session, any changes to it require updating the session's cached value.
        extraLines - Extra lines to be sent - valid only for server sessions. Note:/B> the handler may modify these lines and return null thus signaling the session to proceed with sending the identification
        Returns:
        A IoWriteFuture that can be used to wait for the data to be sent successfully. If null then the session will send the identification, otherwise it is assumed that the handler has sent it.
        Throws:
        java.lang.Exception - if failed to handle the callback
        See Also:
        RFC 4253 - section 4.2 - Protocol Version Exchange
      • handleIgnoreMessage

        public void handleIgnoreMessage​(Session session,
                                        byte[] data,
                                        Buffer buffer)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleDebugMessage

        public void handleDebugMessage​(Session session,
                                       boolean display,
                                       java.lang.String msg,
                                       java.lang.String lang,
                                       Buffer buffer)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleUnimplementedMessage

        public boolean handleUnimplementedMessage​(Session session,
                                                  int cmd,
                                                  Buffer buffer)
                                           throws java.lang.Exception
        Description copied from interface: ReservedSessionMessagesHandler
        Invoked when a packet with an un-implemented message is received - including SSH_MSG_UNIMPLEMENTED itself
        Specified by:
        handleUnimplementedMessage in interface ReservedSessionMessagesHandler
        Parameters:
        session - The Session through which the message was received
        cmd - The received (un-implemented) command
        buffer - The Buffer containing the data - positioned just beyond the command
        Returns:
        true if message handled internally, false if should return a SSH_MSG_UNIMPLEMENTED reply (default behavior)
        Throws:
        java.lang.Exception - If failed to handle the message
        See Also:
        RFC 4253 - section 11.4