Package org.jenkinsci.remoting.util
Class LoggingChannelListener
java.lang.Object
hudson.remoting.Channel.Listener
org.jenkinsci.remoting.util.LoggingChannelListener
Channel listener which merely formats events to a logger.
- Since:
- 3.17
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonClosed(Channel channel, IOException cause) When the channel was closed normally or abnormally due to an error.voidCalled when a JAR file is being sent to the remote side.voidCalled when a command is successfully received by a channel.voidonResponse(Channel channel, Request<?, ?> req, Response<?, ?> rsp, long totalTime) Called when a response has been read from a channel.voidCalled when a command is successfully written to a channel.
-
Constructor Details
-
LoggingChannelListener
-
-
Method Details
-
onClosed
Description copied from class:Channel.ListenerWhen the channel was closed normally or abnormally due to an error.- Overrides:
onClosedin classChannel.Listenercause- if the channel is closed abnormally, this parameter represents an exception that has triggered it. Otherwise null.
-
onRead
Description copied from class:Channel.ListenerCalled when a command is successfully received by a channel.- Overrides:
onReadin classChannel.Listener- Parameters:
channel- a channelcmd- a commandblockSize- the number of bytes used to read this command
-
onWrite
Description copied from class:Channel.ListenerCalled when a command is successfully written to a channel. SeeChannel.Listener.onRead(hudson.remoting.Channel, hudson.remoting.Command, long)for general usage guidelines.- Overrides:
onWritein classChannel.Listener- Parameters:
channel- a channelcmd- a commandblockSize- the number of bytes used to write this command
-
onResponse
Description copied from class:Channel.ListenerCalled when a response has been read from a channel.- Overrides:
onResponsein classChannel.Listener- Parameters:
channel- a channelreq- the original requestrsp- the resulting responsetotalTime- the total time in nanoseconds taken to service the request
-
onJar
Description copied from class:Channel.ListenerCalled when a JAR file is being sent to the remote side.- Overrides:
onJarin classChannel.Listener- Parameters:
channel- a channeljar- the JAR file from which code is being loaded remotely- See Also:
-