Package com.google.gerrit.sshd
Class ChannelIdTrackingUnknownChannelReferenceHandler
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
com.google.gerrit.sshd.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 ChannelIdTrackingUnknownChannelReferenceHandler
Fields inherited from class org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
INSTANCE
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
Fields inherited from interface org.apache.sshd.common.channel.ChannelListener
EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
channelInitialized
(org.apache.sshd.common.channel.Channel channel) 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) Methods inherited from class org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
sendFailureResponse
Methods 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, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
channelInitialized
in 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:
handleUnknownChannelCommand
in interfaceorg.apache.sshd.common.session.UnknownChannelReferenceHandler
- Overrides:
handleUnknownChannelCommand
in classorg.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler
- Throws:
IOException
-