public abstract class AbstractDecompressingPostProcessor extends Object implements MessagePostProcessor, Ordered
MessageProperties.SPRING_AUTO_DECOMPRESS header is true or to optionally always
decompress if the content encoding matches getEncoding(), or starts with
getEncoding() + ":", in which case the encoding following the colon becomes
the final content encoding of the decompressed message.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractDecompressingPostProcessor()
Construct a post processor that will decompress the supported content
encoding only if
MessageProperties.SPRING_AUTO_DECOMPRESS header is present
and true. |
AbstractDecompressingPostProcessor(boolean alwaysDecompress)
Construct a post processor that will decompress the supported content
encoding if
MessageProperties.SPRING_AUTO_DECOMPRESS header is present
and true or if alwaysDecompress is true. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract InputStream |
getDecompressorStream(InputStream stream) |
protected abstract String |
getEncoding() |
int |
getOrder() |
Message |
postProcessMessage(Message message) |
protected void |
setOrder(int order) |
public AbstractDecompressingPostProcessor()
MessageProperties.SPRING_AUTO_DECOMPRESS header is present
and true.public AbstractDecompressingPostProcessor(boolean alwaysDecompress)
MessageProperties.SPRING_AUTO_DECOMPRESS header is present
and true or if alwaysDecompress is true.alwaysDecompress - true to always decompress.protected void setOrder(int order)
order - the order, default 0.Orderedpublic Message postProcessMessage(Message message) throws AmqpException
postProcessMessage in interface MessagePostProcessorAmqpExceptionprotected abstract InputStream getDecompressorStream(InputStream stream) throws IOException
stream - The output stream to write the compressed data to.IOException - IOExceptionprotected abstract String getEncoding()