mirror of https://github.com/apache/activemq.git
fix for AMQ-2003
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@718592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1ab2f59af7
commit
da98de0459
|
@ -40,12 +40,22 @@ public class StompFrame implements Command {
|
|||
private Map<String, String> headers = new HashMap<String, String>();
|
||||
private byte[] content = NO_DATA;
|
||||
|
||||
public StompFrame(String command) {
|
||||
this(command, null, null);
|
||||
}
|
||||
|
||||
public StompFrame(String command, Map<String, String> headers) {
|
||||
this(command, headers, null);
|
||||
}
|
||||
|
||||
public StompFrame(String command, Map<String, String> headers, byte[] data) {
|
||||
this.action = command;
|
||||
this.headers = headers;
|
||||
this.content = data;
|
||||
if (headers != null)
|
||||
this.headers = headers;
|
||||
if (data != null)
|
||||
this.content = data;
|
||||
}
|
||||
|
||||
|
||||
public StompFrame() {
|
||||
}
|
||||
|
||||
|
@ -60,6 +70,10 @@ public class StompFrame implements Command {
|
|||
public byte[] getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
return new String(content);
|
||||
}
|
||||
|
||||
public void setContent(byte[] data) {
|
||||
this.content = data;
|
||||
|
|
Loading…
Reference in New Issue