public interface ChannelListener extends SshdEventListener
| Modifier and Type | Field and Description |
|---|---|
static ChannelListener |
EMPTY |
| Modifier and Type | Method and Description |
|---|---|
default 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 the
Channel.init(org.apache.sshd.common.session.ConnectionService, org.apache.sshd.common.session.Session, int)
method. |
default void |
channelOpenFailure(Channel channel,
Throwable reason)
Called to inform about the failure to open a channel
|
default 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> |
validateListener(L listener) |
validateListenerstatic final ChannelListener EMPTY
default void channelInitialized(Channel channel)
Channel.init(org.apache.sshd.common.session.ConnectionService, org.apache.sshd.common.session.Session, int)
method. Note: this method is guaranteed to be called
before either of the channelOpenSuccess(Channel) or
channelOpenFailure(Channel, Throwable) will be calledchannel - The initialized Channeldefault void channelOpenSuccess(Channel channel)
channel - The newly opened Channeldefault void channelOpenFailure(Channel channel, Throwable reason)
channel - The failed Channelreason - The Throwable reason - Note: if the
channelOpenSuccess(Channel) notification throws an exception
it will cause this method to be invokeddefault void channelStateChanged(Channel channel, String hint)
channel - The Channel whose state has changedhint - A "hint" as to the nature of the state change.
it can be a request name or a SSH_MSG_CHANNEL_XXX command
or the name of an exception classdefault void channelClosed(Channel channel, Throwable reason)
channelOpenSuccess(Channel) or
channelOpenFailure(Channel, Throwable) have been calledchannel - The referenced Channelreason - The reason why the channel is being closed - if null
then normal closurestatic <L extends ChannelListener> L validateListener(L listener)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.