This closes #77 Stomp changes

This commit is contained in:
Clebert Suconic 2015-07-14 09:54:41 -04:00
commit f414c441f2
3 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,7 @@ public class ActiveMQStompException extends Exception
if (body != null)
{
frame.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
frame.setByteBody(body.getBytes(StandardCharsets.UTF_8));
}
else

View File

@ -211,6 +211,7 @@ public class StompSession implements SessionCallback
if (stompSubscription != null)
{
StompFrame frame = connection.getFrameHandler().createStompFrame(Stomp.Responses.ERROR);
frame.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
frame.setBody("consumer with ID " + consumerId + " disconnected by server");
connection.sendFrame(frame);
}

View File

@ -105,6 +105,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
// not valid
response = createStompFrame(Stomp.Responses.ERROR);
response.setNeedsDisconnect(true);
response.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
response.addHeader(Stomp.Headers.Error.MESSAGE, "Failed to connect");
response.setBody("The login account is not valid.");
}