Package org.apache.sshd.common.channel
Interface ChannelListener
- All Superinterfaces:
EventListener,SshdEventListener
- All Known Implementing Classes:
SftpFileSystem.SftpClientHandle
Provides a simple listener for client / server channels being established or torn down. Note: for server-side
listeners, some of the established channels may be client - especially where connection proxy or forwarding is
concerned
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidchannelClosed(Channel channel, Throwable reason) Called to inform about a channel being closed.default voidchannelInitialized(Channel channel) Called to inform about initial setup of a channel via theChannel.init(org.apache.sshd.common.session.ConnectionService, org.apache.sshd.common.session.Session, long)method.default voidchannelOpenFailure(Channel channel, Throwable reason) Called to inform about the failure to open a channeldefault voidchannelOpenSuccess(Channel channel) Called to inform about a channel being successfully opened for a session.default voidchannelStateChanged(Channel channel, String hint) Called to inform that the channel state may have changed - e.g., received EOF, window adjustment, etc..static <L extends ChannelListener>
LvalidateListener(L listener)
-
Field Details
-
EMPTY
-
-
Method Details
-
channelInitialized
Called to inform about initial setup of a channel via theChannel.init(org.apache.sshd.common.session.ConnectionService, org.apache.sshd.common.session.Session, long)method. Note: this method is guaranteed to be called before either of thechannelOpenSuccess(Channel)orchannelOpenFailure(Channel, Throwable)will be called- Parameters:
channel- The initializedChannel
-
channelOpenSuccess
Called to inform about a channel being successfully opened for a session. Note: when the call is made, the channel is known to be open but nothing beyond that.- Parameters:
channel- The newly openedChannel
-
channelOpenFailure
Called to inform about the failure to open a channel- Parameters:
channel- The failedChannelreason- TheThrowablereason - Note: if thechannelOpenSuccess(Channel)notification throws an exception it will cause this method to be invoked
-
channelStateChanged
Called to inform that the channel state may have changed - e.g., received EOF, window adjustment, etc..- Parameters:
channel- TheChannelwhose state has changedhint- A "hint" as to the nature of the state change. it can be a request name or aSSH_MSG_CHANNEL_XXXcommand or the name of an exception class
-
channelClosed
Called to inform about a channel being closed. Note: when the call is made there are no guarantees about the channel's actual state except that it either has been already closed or may be in the process of being closed. Note: this method is guaranteed to be called regardless of whetherchannelOpenSuccess(Channel)orchannelOpenFailure(Channel, Throwable)have been called- Parameters:
channel- The referencedChannelreason- The reason why the channel is being closed - ifnullthen normal closure
-
validateListener
-