[hornetq-commits] JBoss hornetq SVN: r10564 - trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/stomp.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Apr 27 22:29:18 EDT 2011
Author: clebert.suconic at jboss.com
Date: 2011-04-27 22:29:18 -0400 (Wed, 27 Apr 2011)
New Revision: 10564
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/stomp/StompDecoder.java
Log:
Adding receipt on StompDecoder as well
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/stomp/StompDecoder.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/stomp/StompDecoder.java 2011-04-28 02:23:07 UTC (rev 10563)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/stomp/StompDecoder.java 2011-04-28 02:29:18 UTC (rev 10564)
@@ -27,7 +27,7 @@
*
*/
public class StompDecoder
-{
+{
private static final Logger log = Logger.getLogger(StompDecoder.class);
private static final boolean TRIM_LEADING_HEADER_VALUE_WHITESPACE = true;
@@ -80,6 +80,10 @@
private static final String COMMAND_ERROR = "ERROR";
private static final int COMMAND_ERROR_LENGTH = COMMAND_ERROR.length();
+
+ private static final String COMMAND_RECEIPT = "RECEIPT";
+
+ private static final int COMMAND_RECEIPT_LENGTH = COMMAND_RECEIPT.length();
/**** end ****/
private static final byte A = (byte)'A';
@@ -95,6 +99,8 @@
private static final byte M = (byte)'M';
private static final byte S = (byte)'S';
+
+ private static final byte R = (byte)'R';
private static final byte U = (byte)'U';
@@ -282,6 +288,18 @@
break;
}
+ case R:
+ {
+ if (!tryIncrement(offset + COMMAND_RECEIPT_LENGTH + 1))
+ {
+ return null;
+ }
+
+ // RECEIPT
+ command = COMMAND_RECEIPT;
+
+ break;
+ }
/**** added by meddy, 27 april 2011, handle header parser for reply to websocket protocol ****/
case E:
{
More information about the hornetq-commits
mailing list