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 defaultConnectionService
implementation assigns channels identifiers in ascending order.
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.sshd.common.AttributeRepository.AttributeKey<Integer>
LAST_CHANNEL_ID_KEY
static ChannelIdTrackingUnknownChannelReferenceHandler
TRACKER
-
Constructor Summary
Constructors Constructor Description ChannelIdTrackingUnknownChannelReferenceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelInitialized(org.apache.sshd.common.channel.Channel channel)
org.apache.sshd.common.channel.Channel
handleUnknownChannelCommand(org.apache.sshd.common.session.ConnectionService service, byte cmd, int 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
-
-
-
-
Field Detail
-
LAST_CHANNEL_ID_KEY
public static final org.apache.sshd.common.AttributeRepository.AttributeKey<Integer> LAST_CHANNEL_ID_KEY
-
TRACKER
public static final ChannelIdTrackingUnknownChannelReferenceHandler TRACKER
-
-
Method Detail
-
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, int 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
-
-