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.
@FunctionalInterface public static interface AbstractChannel.PacketValidator
AAbstractChannel.PacketValidator
can validate packet lengths. Used forSshConstants.SSH_MSG_CHANNEL_DATA
andSshConstants.SSH_MSG_CHANNEL_EXTENDED_DATA
messages.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isValid(long packetSize, long maximumPacketSize, boolean extendedData)
Tells whether a packet received oflen
bytes is valid given a channel'smaximumPacketSize
.
-
-
-
Method Detail
-
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.
-
-