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,9 +40,19 @@ 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;
|
||||
if (headers != null)
|
||||
this.headers = headers;
|
||||
if (data != null)
|
||||
this.content = data;
|
||||
}
|
||||
|
||||
|
@ -61,6 +71,10 @@ public class StompFrame implements Command {
|
|||
return content;
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
return new String(content);
|
||||
}
|
||||
|
||||
public void setContent(byte[] data) {
|
||||
this.content = data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue