public class StompFrame extends Object
Modifier and Type | Class and Description |
---|---|
class |
StompFrame.Header |
Modifier and Type | Field and Description |
---|---|
protected 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) |
ActiveMQBuffer |
toActiveMQBuffer() |
String |
toString() |
protected static final byte[] END_OF_FRAME
protected final String command
protected byte[] bytesBody
protected 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 ActiveMQBuffer toActiveMQBuffer() throws Exception
Exception
protected 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 © 2016 The Apache Software Foundation. All rights reserved.