Class DefaultUnknownChannelReferenceHandler

    • Field Detail

      • SEND_REPLY_FOR_CHANNEL_DATA

        public static final java.lang.String SEND_REPLY_FOR_CHANNEL_DATA
        RFC4254 does not clearly specify how to handle SSH_MSG_CHANNEL_DATA and SSH_MSG_CHANNEL_EXTENDED_DATA received through an unknown channel. Therefore, we provide a configurable approach to it with the default set to ignore it.
        See Also:
        Constant Field Values
      • DEFAULT_SEND_REPLY_FOR_CHANNEL_DATA

        public static final boolean DEFAULT_SEND_REPLY_FOR_CHANNEL_DATA
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultUnknownChannelReferenceHandler

        public DefaultUnknownChannelReferenceHandler()
    • Method Detail

      • handleUnknownChannelCommand

        public Channel handleUnknownChannelCommand​(ConnectionService service,
                                                   byte cmd,
                                                   int channelId,
                                                   Buffer buffer)
                                            throws java.io.IOException
        Description copied from interface: UnknownChannelReferenceHandler
        Invoked when the connection service responsible for handling channel messages receives a message intended for an unknown channel.
        Specified by:
        handleUnknownChannelCommand in interface UnknownChannelReferenceHandler
        Parameters:
        service - The ConnectionService instance through which the message was received
        cmd - The requested command identifier
        channelId - The (unknown) target channel identifier
        buffer - The message Buffer containing the rest of the message
        Returns:
        The resolved Channel - if null then the message for the unknown channel is ignored.
        Throws:
        java.io.IOException - If failed to handle the request
      • sendFailureResponse

        protected IoWriteFuture sendFailureResponse​(ConnectionService service,
                                                    byte cmd,
                                                    int channelId)
                                             throws java.io.IOException
        Throws:
        java.io.IOException