Class LoggingChannelListener

java.lang.Object
hudson.remoting.Channel.Listener
org.jenkinsci.remoting.util.LoggingChannelListener

public class LoggingChannelListener extends Channel.Listener
Channel listener which merely formats events to a logger.
Since:
3.17
  • Constructor Details

    • LoggingChannelListener

      public LoggingChannelListener(Logger logger, Level level)
  • Method Details

    • onClosed

      public void onClosed(Channel channel, IOException cause)
      Description copied from class: Channel.Listener
      When the channel was closed normally or abnormally due to an error.
      Overrides:
      onClosed in class Channel.Listener
      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)
      Description copied from class: Channel.Listener
      Called when a command is successfully received by a channel.
      Overrides:
      onRead in class Channel.Listener
      Parameters:
      channel - a channel
      cmd - a command
      blockSize - the number of bytes used to read this command
    • onWrite

      public void onWrite(Channel channel, Command cmd, long blockSize)
      Description copied from class: Channel.Listener
      Called when a command is successfully written to a channel. See Channel.Listener.onRead(hudson.remoting.Channel, hudson.remoting.Command, long) for general usage guidelines.
      Overrides:
      onWrite in class Channel.Listener
      Parameters:
      channel - a channel
      cmd - a command
      blockSize - the number of bytes used to write this command
    • onResponse

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

      public void onJar(Channel channel, File jar)
      Description copied from class: Channel.Listener
      Called when a JAR file is being sent to the remote side.
      Overrides:
      onJar in class Channel.Listener
      Parameters:
      channel - a channel
      jar - the JAR file from which code is being loaded remotely
      See Also: