Add a method for manually send a keep alive value to the broker.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1401300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-10-23 14:14:39 +00:00
parent 7cb7d188f9
commit 79127ae440
1 changed files with 6 additions and 0 deletions

View File

@ -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()) {