Package org.apache.sshd.common.channel
Interface ChannelListener
- All Superinterfaces:
EventListener
,SshdEventListener
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
- Author:
- Apache MINA SSHD Project
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
channelClosed
(Channel channel, Throwable reason) Called to inform about a channel being closed.default void
channelInitialized
(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 void
channelOpenFailure
(Channel channel, Throwable reason) Called to inform about the failure to open a channeldefault void
channelOpenSuccess
(Channel channel) Called to inform about a channel being successfully opened for a session.default void
channelStateChanged
(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 failedChannel
reason
- TheThrowable
reason - 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
- TheChannel
whose state has changedhint
- A "hint" as to the nature of the state change. it can be a request name or aSSH_MSG_CHANNEL_XXX
command 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 referencedChannel
reason
- The reason why the channel is being closed - ifnull
then normal closure
-
validateListener
-