mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-03-06 09:20:07 +00:00
This closes #77 Stomp changes
This commit is contained in:
commit
f414c441f2
@ -91,6 +91,7 @@ public class ActiveMQStompException extends Exception
|
|||||||
|
|
||||||
if (body != null)
|
if (body != null)
|
||||||
{
|
{
|
||||||
|
frame.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
|
||||||
frame.setByteBody(body.getBytes(StandardCharsets.UTF_8));
|
frame.setByteBody(body.getBytes(StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -211,6 +211,7 @@ public class StompSession implements SessionCallback
|
|||||||
if (stompSubscription != null)
|
if (stompSubscription != null)
|
||||||
{
|
{
|
||||||
StompFrame frame = connection.getFrameHandler().createStompFrame(Stomp.Responses.ERROR);
|
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");
|
frame.setBody("consumer with ID " + consumerId + " disconnected by server");
|
||||||
connection.sendFrame(frame);
|
connection.sendFrame(frame);
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
|
|||||||
// not valid
|
// not valid
|
||||||
response = createStompFrame(Stomp.Responses.ERROR);
|
response = createStompFrame(Stomp.Responses.ERROR);
|
||||||
response.setNeedsDisconnect(true);
|
response.setNeedsDisconnect(true);
|
||||||
|
response.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
|
||||||
response.addHeader(Stomp.Headers.Error.MESSAGE, "Failed to connect");
|
response.addHeader(Stomp.Headers.Error.MESSAGE, "Failed to connect");
|
||||||
response.setBody("The login account is not valid.");
|
response.setBody("The login account is not valid.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user