Interface Frames


  • public interface Frames
    Utility methods to build common Frames. It defines a non-STOMP frame (PING) that is used for heartbeats. When such frame is written on the wire it is just the 0 byte.

    This class is thread-safe.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Frame PING  
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static Frame createErrorFrame​(java.lang.String message, java.util.Map<java.lang.String,​java.lang.String> headers, java.lang.String body)  
      static Frame createErrorFrame​(java.lang.Throwable throwable, boolean includeStackTrace)
      Creates and error frame for given throwable and includes the stack trace in the body if desired
      static Frame createReceiptFrame​(java.lang.String receiptId, java.util.Map<java.lang.String,​java.lang.String> headers)  
      static Frame ping()  
    • Field Detail

      • PING

        static final Frame PING
    • Method Detail

      • createErrorFrame

        static Frame createErrorFrame​(java.lang.String message,
                                      java.util.Map<java.lang.String,​java.lang.String> headers,
                                      java.lang.String body)
      • createErrorFrame

        static Frame createErrorFrame​(java.lang.Throwable throwable,
                                      boolean includeStackTrace)
        Creates and error frame for given throwable and includes the stack trace in the body if desired
        Parameters:
        throwable - to create an error frame for
        includeStackTrace - true to include the stack trace false to not
        Returns:
        the Frame
      • createReceiptFrame

        static Frame createReceiptFrame​(java.lang.String receiptId,
                                        java.util.Map<java.lang.String,​java.lang.String> headers)
      • ping

        static Frame ping()