void updateSimpMessageHeadersFromStompHeaders() { if (getNativeHeaders() == null) { return; } String value = getFirstNativeHeader(STOMP_DESTINATION_HEADER); if (value != null) { super.setDestination(value); } value = getFirstNativeHeader(STOMP_CONTENT_TYPE_HEADER); if (value != null) { super.setContentType(MimeTypeUtils.parseMimeType(value)); } StompCommand command = getCommand(); if (StompCommand.MESSAGE.equals(command)) { value = getFirstNativeHeader(STOMP_SUBSCRIPTION_HEADER); if (value != null) { super.setSubscriptionId(value); } } else if (StompCommand.SUBSCRIBE.equals(command) || StompCommand.UNSUBSCRIBE.equals(command)) { value = getFirstNativeHeader(STOMP_ID_HEADER); if (value != null) { super.setSubscriptionId(value); } } else if (StompCommand.CONNECT.equals(command)) { protectPasscode(); } }
public void setPasscode(String passcode) { setNativeHeader(STOMP_PASSCODE_HEADER, passcode); protectPasscode(); }