Class ChannelIdTrackingUnknownChannelReferenceHandler
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
org.apache.sshd.contrib.common.session.helpers.ChannelIdTrackingUnknownChannelReferenceHandler
- All Implemented Interfaces:
EventListener, org.apache.sshd.common.channel.ChannelListener, org.apache.sshd.common.session.UnknownChannelReferenceHandler, org.apache.sshd.common.util.SshdEventListener
public class ChannelIdTrackingUnknownChannelReferenceHandler
extends org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
implements org.apache.sshd.common.channel.ChannelListener
Makes sure that the referenced "unknown" channel identifier is one that was assigned in the past.
Note: it relies on the fact that the default
ConnectionService implementation assigns channels
identifiers in ascending order.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.sshd.common.AttributeRepository.AttributeKey<Long> static final ChannelIdTrackingUnknownChannelReferenceHandlerFields inherited from class org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
INSTANCEFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.channel.ChannelListener
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelInitialized(org.apache.sshd.common.channel.Channel channel) org.apache.sshd.common.channel.ChannelhandleUnknownChannelCommand(org.apache.sshd.common.session.ConnectionService service, byte cmd, long channelId, org.apache.sshd.common.util.buffer.Buffer buffer) Methods inherited from class org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
sendFailureResponseMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sshd.common.channel.ChannelListener
channelClosed, channelOpenFailure, channelOpenSuccess, channelStateChanged
-
Field Details
-
LAST_CHANNEL_ID_KEY
public static final org.apache.sshd.common.AttributeRepository.AttributeKey<Long> LAST_CHANNEL_ID_KEY -
TRACKER
-
-
Constructor Details
-
ChannelIdTrackingUnknownChannelReferenceHandler
public ChannelIdTrackingUnknownChannelReferenceHandler()
-
-
Method Details
-
channelInitialized
public void channelInitialized(org.apache.sshd.common.channel.Channel channel) - Specified by:
channelInitializedin interfaceorg.apache.sshd.common.channel.ChannelListener
-
handleUnknownChannelCommand
public org.apache.sshd.common.channel.Channel handleUnknownChannelCommand(org.apache.sshd.common.session.ConnectionService service, byte cmd, long channelId, org.apache.sshd.common.util.buffer.Buffer buffer) throws IOException - Specified by:
handleUnknownChannelCommandin interfaceorg.apache.sshd.common.session.UnknownChannelReferenceHandler- Overrides:
handleUnknownChannelCommandin classorg.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler- Throws:
IOException
-