public class EmbeddedHeadersMessageConverter extends Object
0xff, n(1), [ [lenHdr(1), hdr, lenValue(4), value] ... ]
.
The 0xff indicates this new format; n is number of headers (max 255); for
each header, the name length (1 byte) is followed by the name, followed by
the value length (int) followed by the value (json).
Previously, there was no leading 0xff; the value length was 1 byte and only String header values were supported (no JSON conversion).
Constructor and Description |
---|
EmbeddedHeadersMessageConverter() |
Modifier and Type | Method and Description |
---|---|
static String |
decodeExceptionMessage(org.springframework.messaging.Message<?> requestMessage) |
byte[] |
embedHeaders(MessageValues original,
String... headers)
Return a new message where some of the original headers of
original
have been embedded into the new message payload. |
MessageValues |
extractHeaders(org.springframework.messaging.Message<byte[]> message,
boolean copyRequestHeaders)
Return a message where headers, that were originally embedded into the payload,
have been promoted back to actual headers.
|
public static String decodeExceptionMessage(org.springframework.messaging.Message<?> requestMessage)
public byte[] embedHeaders(MessageValues original, String... headers) throws Exception
original
have been embedded into the new message payload.Exception
public MessageValues extractHeaders(org.springframework.messaging.Message<byte[]> message, boolean copyRequestHeaders) throws Exception
message
- the message to extract headerscopyRequestHeaders
- boolean value to specify if original headers should be
copiedException
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.