Package hudson.remoting
Class Channel.Listener
java.lang.Object
hudson.remoting.Channel.Listener
- Direct Known Subclasses:
LoggingChannelListener
- Enclosing class:
Channel
Callback "interface" for changes in the state of
Channel.- See Also:
-
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
-
Listener
public Listener()
-
-
Method Details
-
onClosed
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
Called when a command is successfully received by a channel.- Parameters:
channel- a channelcmd- a commandblockSize- the number of bytes used to read this command- Since:
- 3.17
-
onWrite
Called when a command is successfully written to a channel. SeeonRead(hudson.remoting.Channel, hudson.remoting.Command, long)for general usage guidelines.- Parameters:
channel- a channelcmd- a commandblockSize- the number of bytes used to write this command- Since:
- 3.17
-
onResponse
Called when a response has been read from a channel.- Parameters:
channel- a channelreq- the original requestrsp- the resulting responsetotalTime- the total time in nanoseconds taken to service the request- Since:
- 3.17
-
onJar
Called when a JAR file is being sent to the remote side.- Parameters:
channel- a channeljar- the JAR file from which code is being loaded remotely- Since:
- 3.17
- See Also:
-