Class PacketTooLargeException

  • All Implemented Interfaces:
    Serializable

    public class PacketTooLargeException
    extends IOException
    Raised by Session.receive() when this server runs out of heap for a frame: most likely one whose length header announces more bytes than it can allocate, though an OutOfMemoryError reading or decoding a frame of an ordinary size is raised as this too.

    It is an IOException, so that every caller which takes it for a session to give up still does. A handshake tells it apart from the other ones, which are the peer going away: either the peer breaks the protocol, no handshake message coming near the size such a header announces, or this server is short of heap, and either is an error.

    See Also:
    Serialized Form
    • Constructor Detail

      • PacketTooLargeException

        public PacketTooLargeException​(int length)
        Creates the exception for a frame of the provided length.
        Parameters:
        length - the length the header of the frame announced