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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onClosed
(Channel channel, IOException cause) When the channel was closed normally or abnormally due to an error.void
Called when a JAR file is being sent to the remote side.void
Called when a command is successfully received by a channel.void
onResponse
(Channel channel, Request<?, ?> req, Response<?, ?> rsp, long totalTime) Called when a response has been read from a channel.void
Called when a command is successfully written to a channel.
-
Constructor Details
-
LoggingChannelListener
-
-
Method Details
-
onClosed
Description copied from class:Channel.Listener
When the channel was closed normally or abnormally due to an error.- Overrides:
onClosed
in classChannel.Listener
cause
- if the channel is closed abnormally, this parameter represents an exception that has triggered it. Otherwise null.
-
onRead
Description copied from class:Channel.Listener
Called when a command is successfully received by a channel.- Overrides:
onRead
in classChannel.Listener
- Parameters:
channel
- a channelcmd
- a commandblockSize
- the number of bytes used to read this command
-
onWrite
Description copied from class:Channel.Listener
Called when a command is successfully written to a channel. SeeChannel.Listener.onRead(hudson.remoting.Channel, hudson.remoting.Command, long)
for general usage guidelines.- Overrides:
onWrite
in classChannel.Listener
- Parameters:
channel
- a channelcmd
- a commandblockSize
- the number of bytes used to write this command
-
onResponse
Description copied from class:Channel.Listener
Called when a response has been read from a channel.- Overrides:
onResponse
in 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.Listener
Called when a JAR file is being sent to the remote side.- Overrides:
onJar
in classChannel.Listener
- Parameters:
channel
- a channeljar
- the JAR file from which code is being loaded remotely- See Also:
-