Use more versioned STOMP frames rather than generic
This commit is contained in:
parent
970623f52b
commit
ebcf0c0080
|
@ -165,7 +165,7 @@ public abstract class VersionedStompFrameHandler
|
|||
|
||||
public StompFrame handleReceipt(String receiptID)
|
||||
{
|
||||
StompFrame receipt = new StompFrame(Stomp.Responses.RECEIPT);
|
||||
StompFrame receipt = createStompFrame(Stomp.Responses.RECEIPT);
|
||||
receipt.addHeader(Stomp.Headers.Response.RECEIPT_ID, receiptID);
|
||||
|
||||
return receipt;
|
||||
|
|
|
@ -103,7 +103,8 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
|
|||
else
|
||||
{
|
||||
// not valid
|
||||
response = new StompFrame(Stomp.Responses.ERROR, true);
|
||||
response = createStompFrame(Stomp.Responses.ERROR);
|
||||
response.setNeedsDisconnect(true);
|
||||
response.addHeader(Stomp.Headers.Error.MESSAGE, "Failed to connect");
|
||||
response.setBody("The login account is not valid.");
|
||||
}
|
||||
|
@ -268,7 +269,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
|
|||
|
||||
public StompFrame createPingFrame()
|
||||
{
|
||||
StompFrame frame = new StompFrame(Stomp.Commands.STOMP);
|
||||
StompFrame frame = createStompFrame(Stomp.Commands.STOMP);
|
||||
frame.setPing(true);
|
||||
return frame;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue