Package com.sshtools.common.ssh
Interface ChannelEventListener
public interface ChannelEventListener
Interface for receiving
Channel events (currently only supports the
close event).- Author:
- Lee David Painter
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonChannelClose(Channel channel) The channel has been closeddefault voidonChannelClosing(Channel channel) The channel is closing, but has not sent its SSH_MSG_CHANNEL_CLOSEdefault voidonChannelDataIn(Channel channel, ByteBuffer buffer) Data has been received on the channel.default voidonChannelDataOut(Channel channel, ByteBuffer buffer) Data has been sent on the channel.default voidonChannelEOF(Channel channel) The channel has received an EOF from the remote clientdefault voidonChannelError(Channel channel, Throwable e) Called when a channel is disconnected because of a connection loss.default voidonChannelExtendedData(Channel channel, ByteBuffer buffer, int type) Data has been received on the extended channel.default voidonChannelOpen(Channel channel) The channel has been opened.default voidonWindowAdjust(Channel channel, long currentWindowSpace) When the remote side adjusts its window.
-
Method Details
-
onChannelOpen
The channel has been opened.- Parameters:
channel- channel
-
onChannelClose
The channel has been closed- Parameters:
channel- channel
-
onChannelEOF
The channel has received an EOF from the remote client- Parameters:
channel-channel- channel
-
onChannelError
Called when a channel is disconnected because of a connection loss. You may still receive onChannelClose event after this.- Parameters:
channel- channel
-
onChannelClosing
The channel is closing, but has not sent its SSH_MSG_CHANNEL_CLOSE- Parameters:
channel- Channel
-
onWindowAdjust
When the remote side adjusts its window.- Parameters:
channel- channelcurrentWindowSpace- current window space
-
onChannelDataIn
Data has been received on the channel. The buffer provided is the same buffer that will be passed on to any thread reading the channels streams.- Parameters:
channel- Channelbuffer- buffer
-
onChannelExtendedData
Data has been received on the extended channel. The buffer provided is the same buffer that will be passed on to any thread reading the channels streams.- Parameters:
channel- Channelbuffer- buffertype- type
-
onChannelDataOut
Data has been sent on the channel. The buffer provided is the same buffer that will be passed on to any thread writing the channels streams.- Parameters:
channel- Channelbuffer- buffer
-