public class DelegatingDecompressingPostProcessor extends Object implements MessagePostProcessor, Ordered
MessagePostProcessor
that delegates to one of its MessagePostProcessor
s
depending on the content encoding. Supports gzip, zip, deflate
by default.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
DelegatingDecompressingPostProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
addDecompressor(String contentEncoding,
MessagePostProcessor decompressor)
Add a message post processor to the map of decompressing MessageProcessors.
|
int |
getOrder() |
Message |
postProcessMessage(Message message)
Change (or replace) the message.
|
MessagePostProcessor |
removeDecompressor(String contentEncoding)
Remove the decompressor for this encoding; content will not be decompressed even if the
MessageProperties.SPRING_AUTO_DECOMPRESS header is true. |
void |
setDecompressors(Map<String,MessagePostProcessor> decompressors)
Replace all the decompressors.
|
void |
setOrder(int order)
Set the order.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
postProcessMessage, postProcessMessage
public DelegatingDecompressingPostProcessor()
public void setOrder(int order)
order
- the order.Ordered
public void addDecompressor(String contentEncoding, MessagePostProcessor decompressor)
contentEncoding
- the content encoding; messages will be decompressed with this post processor
if its content-encoding
property matches, or begins with this key followed by ":".decompressor
- the decompressing MessagePostProcessor
.public MessagePostProcessor removeDecompressor(String contentEncoding)
MessageProperties.SPRING_AUTO_DECOMPRESS
header is true.contentEncoding
- the content encoding.public void setDecompressors(Map<String,MessagePostProcessor> decompressors)
decompressors
- the decompressors.public Message postProcessMessage(Message message) throws AmqpException
MessagePostProcessor
postProcessMessage
in interface MessagePostProcessor
message
- the message.AmqpException
- an exception.