Class ReservedSessionMessagesHandlerAdapter

java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter
All Implemented Interfaces:
EventListener, ReservedSessionMessagesHandler, org.apache.sshd.common.util.SshdEventListener

public class ReservedSessionMessagesHandlerAdapter extends org.apache.sshd.common.util.logging.AbstractLoggingBean implements ReservedSessionMessagesHandler
Delegates the main interface methods to specific ones after having decoded each message buffer
Author:
Apache MINA SSHD Project
  • Field Details

  • Constructor Details

    • ReservedSessionMessagesHandlerAdapter

      public ReservedSessionMessagesHandlerAdapter()
  • Method Details

    • sendIdentification

      public org.apache.sshd.common.io.IoWriteFuture sendIdentification(Session session, String version, List<String> extraLines) throws 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:
      Exception - if failed to handle the callback
      See Also:
    • handleIgnoreMessage

      public void handleIgnoreMessage(Session session, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception
      Description copied from interface: ReservedSessionMessagesHandler
      Invoked when an SSH_MSG_IGNORE packet is received
      Specified by:
      handleIgnoreMessage in interface ReservedSessionMessagesHandler
      Parameters:
      session - The Session through which the message was received
      buffer - The Buffer containing the data
      Throws:
      Exception - If failed to handle the message
      See Also:
    • handleIgnoreMessage

      public void handleIgnoreMessage(Session session, byte[] data, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception
      Throws:
      Exception
    • handleDebugMessage

      public void handleDebugMessage(Session session, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception
      Description copied from interface: ReservedSessionMessagesHandler
      Invoked when an SSH_MSG_DEBUG packet is received
      Specified by:
      handleDebugMessage in interface ReservedSessionMessagesHandler
      Parameters:
      session - The Session through which the message was received
      buffer - The Buffer containing the data
      Throws:
      Exception - If failed to handle the message
      See Also:
    • handleDebugMessage

      public void handleDebugMessage(Session session, boolean display, String msg, String lang, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception
      Throws:
      Exception
    • handleUnimplementedMessage

      public boolean handleUnimplementedMessage(Session session, int cmd, org.apache.sshd.common.util.buffer.Buffer buffer) throws 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:
      Exception - If failed to handle the message
      See Also: