Class ChannelIdTrackingUnknownChannelReferenceHandler

  • All Implemented Interfaces:
    EventListener, org.apache.sshd.common.channel.ChannelListener, org.apache.sshd.common.session.UnknownChannelReferenceHandler, org.apache.sshd.common.util.SshdEventListener

    public class ChannelIdTrackingUnknownChannelReferenceHandler
    extends org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
    implements org.apache.sshd.common.channel.ChannelListener
    Makes sure that the referenced "unknown" channel identifier is one that was assigned in the past. Note: it relies on the fact that the default ConnectionService implementation assigns channels identifiers in ascending order.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.apache.sshd.common.AttributeRepository.AttributeKey<Integer> LAST_CHANNEL_ID_KEY  
      static ChannelIdTrackingUnknownChannelReferenceHandler TRACKER  
      • Fields inherited from class org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler

        INSTANCE
      • Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

        log
      • Fields inherited from interface org.apache.sshd.common.channel.ChannelListener

        EMPTY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelInitialized​(org.apache.sshd.common.channel.Channel channel)  
      org.apache.sshd.common.channel.Channel handleUnknownChannelCommand​(org.apache.sshd.common.session.ConnectionService service, byte cmd, int channelId, org.apache.sshd.common.util.buffer.Buffer buffer)  
      • Methods inherited from class org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler

        sendFailureResponse
      • Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

        debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
      • Methods inherited from interface org.apache.sshd.common.channel.ChannelListener

        channelClosed, channelOpenFailure, channelOpenSuccess, channelStateChanged
    • Constructor Detail

      • ChannelIdTrackingUnknownChannelReferenceHandler

        public ChannelIdTrackingUnknownChannelReferenceHandler()
    • Method Detail

      • channelInitialized

        public void channelInitialized​(org.apache.sshd.common.channel.Channel channel)
        Specified by:
        channelInitialized in interface org.apache.sshd.common.channel.ChannelListener
      • handleUnknownChannelCommand

        public org.apache.sshd.common.channel.Channel handleUnknownChannelCommand​(org.apache.sshd.common.session.ConnectionService service,
                                                                                  byte cmd,
                                                                                  int channelId,
                                                                                  org.apache.sshd.common.util.buffer.Buffer buffer)
                                                                           throws IOException
        Specified by:
        handleUnknownChannelCommand in interface org.apache.sshd.common.session.UnknownChannelReferenceHandler
        Overrides:
        handleUnknownChannelCommand in class org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
        Throws:
        IOException