Class SplittingStompEncoder

java.lang.Object
org.springframework.messaging.simp.stomp.SplittingStompEncoder

public class SplittingStompEncoder extends Object
Uses a StompEncoder to encode a message and splits it into parts no larger than the configured buffer size limit.
Since:
6.2
Author:
Injae Kim, Rossen Stoyanchev
See Also:
  • Constructor Details

    • SplittingStompEncoder

      public SplittingStompEncoder(StompEncoder encoder, int bufferSizeLimit)
      Create a new SplittingStompEncoder.
      Parameters:
      encoder - the StompEncoder to use
      bufferSizeLimit - the buffer size limit
  • Method Details

    • encode

      public List<byte[]> encode(Map<String,Object> headers, byte[] payload)
      Encode the given payload and headers to a STOMP frame, and split it into a list of parts based on the configured buffer size limit.
      Parameters:
      headers - the STOMP message headers
      payload - the STOMP message payload
      Returns:
      the parts of the encoded STOMP message