Class Channel.Listener

    • Constructor Detail

      • Listener

        public Listener()
    • Method Detail

      • onClosed

        public void onClosed​(Channel channel,
                             IOException cause)
        When the channel was closed normally or abnormally due to an error.
        Parameters:
        cause - if the channel is closed abnormally, this parameter represents an exception that has triggered it. Otherwise null.
      • onRead

        public void onRead​(Channel channel,
                           Command cmd,
                           long blockSize)
        Called when a command is successfully received by a channel.
        Parameters:
        channel - a channel
        cmd - a command
        blockSize - the number of bytes used to read this command
        Since:
        3.17
      • onResponse

        public void onResponse​(Channel channel,
                               Request<?,​?> req,
                               Response<?,​?> rsp,
                               long totalTime)
        Called when a response has been read from a channel.
        Parameters:
        channel - a channel
        req - the original request
        rsp - the resulting response
        totalTime - the total time in nanoseconds taken to service the request
        Since:
        3.17
      • onJar

        public void onJar​(Channel channel,
                          File jar)
        Called when a JAR file is being sent to the remote side.
        Parameters:
        channel - a channel
        jar - the JAR file from which code is being loaded remotely
        Since:
        3.17
        See Also:
        Capability.supportsPrefetch()