Package org.apache.sshd.common.channel
Interface AbstractChannel.PacketValidator
- Enclosing class:
- AbstractChannel
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A
AbstractChannel.PacketValidator
can validate packet lengths. Used for SshConstants.SSH_MSG_CHANNEL_DATA
and
SshConstants.SSH_MSG_CHANNEL_EXTENDED_DATA
messages.-
Method Summary
Modifier and TypeMethodDescriptionboolean
isValid
(long packetSize, long maximumPacketSize, boolean extendedData) Tells whether a packet received oflen
bytes is valid given a channel'smaximumPacketSize
.
-
Method Details
-
isValid
boolean isValid(long packetSize, long maximumPacketSize, boolean extendedData) Tells whether a packet received oflen
bytes is valid given a channel'smaximumPacketSize
.- Parameters:
packetSize
- as read from the SSH packetmaximumPacketSize
- from the channel's local windowextendedData
- whether it's aSshConstants.SSH_MSG_CHANNEL_EXTENDED_DATA
packet- Returns:
true
if the packet is to be considered valid.
-