java.lang.Object
org.apache.activemq.artemis.core.protocol.stomp.StompFrame
Direct Known Subclasses:
StompFrameV10, StompFrameV11

public class StompFrame extends Object
Represents all the data in a STOMP frame.
  • Field Details

    • END_OF_FRAME

      protected static final byte[] END_OF_FRAME
    • command

      protected final String command
    • headers

      protected Map<String,String> headers
    • bytesBody

      protected byte[] bytesBody
    • buffer

      protected ActiveMQBuffer buffer
    • size

      protected int size
  • Constructor Details

    • StompFrame

      public StompFrame(String command)
    • StompFrame

      public StompFrame(String command, boolean disconnect)
    • StompFrame

      public StompFrame(String command, Map<String,String> headers, byte[] content)
  • Method Details

    • getCommand

      public String getCommand()
    • getEncodedSize

      public int getEncodedSize() throws Exception
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isPing

      public boolean isPing()
    • setPing

      public void setPing(boolean ping)
    • toActiveMQBuffer

      public ActiveMQBuffer toActiveMQBuffer() throws Exception
      Throws:
      Exception
    • encodeHeaders

      protected void encodeHeaders(StringBuilder head)
    • getHeader

      public String getHeader(String key)
    • addHeader

      public void addHeader(String key, String val)
    • getHeadersMap

      public Map<String,String> getHeadersMap()
    • encode

      public String encode(String str)
    • setBody

      public void setBody(String body)
    • hasHeader

      public boolean hasHeader(String key)
    • getBody

      public String getBody()
    • getBodyAsBytes

      public byte[] getBodyAsBytes()
    • needsDisconnect

      public boolean needsDisconnect()
    • setByteBody

      public void setByteBody(byte[] content)
    • setNeedsDisconnect

      public void setNeedsDisconnect(boolean b)