public class StompFrame extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
StompFrame.Header |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.activemq.artemis.api.core.ActiveMQBuffer |
buffer |
protected byte[] |
bytesBody |
protected String |
command |
protected static byte[] |
END_OF_FRAME |
protected Map<String,String> |
headers |
protected int |
size |
| Constructor and Description |
|---|
StompFrame(String command) |
StompFrame(String command,
boolean disconnect) |
StompFrame(String command,
Map<String,String> headers,
byte[] content) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String key,
String val) |
String |
encode(String str) |
protected void |
encodeHeaders(StringBuilder head) |
String |
getBody() |
byte[] |
getBodyAsBytes() |
String |
getCommand() |
int |
getEncodedSize() |
String |
getHeader(String key) |
Map<String,String> |
getHeadersMap() |
boolean |
hasHeader(String key) |
boolean |
isPing() |
boolean |
needsDisconnect() |
void |
setBody(String body) |
void |
setByteBody(byte[] content) |
void |
setNeedsDisconnect(boolean b) |
void |
setPing(boolean ping) |
org.apache.activemq.artemis.api.core.ActiveMQBuffer |
toActiveMQBuffer() |
String |
toString() |
protected static final byte[] END_OF_FRAME
protected final String command
protected byte[] bytesBody
protected org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer
protected int size
public StompFrame(String command)
public StompFrame(String command, boolean disconnect)
public String getCommand()
public boolean isPing()
public void setPing(boolean ping)
public org.apache.activemq.artemis.api.core.ActiveMQBuffer toActiveMQBuffer()
throws Exception
Exceptionprotected void encodeHeaders(StringBuilder head)
public void setBody(String body)
public boolean hasHeader(String key)
public String getBody()
public byte[] getBodyAsBytes()
public boolean needsDisconnect()
public void setByteBody(byte[] content)
public void setNeedsDisconnect(boolean b)
Copyright © 2023 The Apache Software Foundation. All Rights Reserved.