activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1401300 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java
Date Tue, 23 Oct 2012 14:14:39 GMT
Author: tabish
Date: Tue Oct 23 14:14:39 2012
New Revision: 1401300

URL: http://svn.apache.org/viewvc?rev=1401300&view=rev
Log:
Add a method for manually send a keep alive value to the broker. 

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=1401300&r1=1401299&r2=1401300&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
Tue Oct 23 14:14:39 2012
@@ -241,6 +241,12 @@ public class StompConnection {
         sendFrame(frame.format());
     }
 
+    public void keepAlive() throws Exception {
+        OutputStream outputStream = stompSocket.getOutputStream();
+        outputStream.write('\n');
+        outputStream.flush();
+    }
+
     protected String appendHeaders(HashMap<String, Object> headers) {
         StringBuilder result = new StringBuilder();
         for (String key : headers.keySet()) {



Mime
View raw message