activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1355553 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java
Date Fri, 29 Jun 2012 20:26:33 GMT
Author: tabish
Date: Fri Jun 29 20:26:32 2012
New Revision: 1355553

URL: http://svn.apache.org/viewvc?rev=1355553&view=rev
Log:
Adds a method to allow for sending a receipt on disconnect send.  

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java?rev=1355553&r1=1355552&r2=1355553&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java
Fri Jun 29 20:26:32 2012
@@ -137,7 +137,14 @@ public class StompConnection {
     }
 
     public void disconnect() throws Exception {
+        disconnect(null);
+    }
+
+    public void disconnect(String receiptId) throws Exception {
         StompFrame frame = new StompFrame("DISCONNECT");
+        if (receiptId != null && !receiptId.isEmpty()) {
+            frame.getHeaders().put(Stomp.Headers.RECEIPT_REQUESTED, receiptId);
+        }
         sendFrame(frame.format());
     }
 



Mime
View raw message