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
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isValid(long packetSize, long maximumPacketSize, boolean extendedData)
    Tells whether a packet received of len bytes is valid given a channel's maximumPacketSize.
  • Method Details

    • isValid

      boolean isValid(long packetSize, long maximumPacketSize, boolean extendedData)
      Tells whether a packet received of len bytes is valid given a channel's maximumPacketSize.
      Parameters:
      packetSize - as read from the SSH packet
      maximumPacketSize - from the channel's local window
      extendedData - whether it's a SshConstants.SSH_MSG_CHANNEL_EXTENDED_DATA packet
      Returns:
      true if the packet is to be considered valid.