Class Channel.Listener

java.lang.Object
hudson.remoting.Channel.Listener
Direct Known Subclasses:
LoggingChannelListener
Enclosing class:
Channel

public abstract static class Channel.Listener extends Object
Callback "interface" for changes in the state of Channel.
See Also:
  • Constructor Details

    • Listener

      public Listener()
  • Method Details

    • 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
    • onWrite

      public void onWrite(Channel channel, Command cmd, long blockSize)
      Called when a command is successfully written to a channel. See onRead(hudson.remoting.Channel, hudson.remoting.Command, long) for general usage guidelines.
      Parameters:
      channel - a channel
      cmd - a command
      blockSize - the number of bytes used to write 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: