public abstract class AbstractDecompressingPostProcessor extends java.lang.Object implements MessagePostProcessor, org.springframework.core.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.| 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 java.io.InputStream |
getDecompressorStream(java.io.InputStream stream) |
protected abstract java.lang.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.public int getOrder()
getOrder in interface org.springframework.core.Orderedprotected void setOrder(int order)
order - the order, default 0.Orderedpublic Message postProcessMessage(Message message) throws AmqpException
postProcessMessage in interface MessagePostProcessorAmqpExceptionprotected abstract java.io.InputStream getDecompressorStream(java.io.InputStream stream)
throws java.io.IOException
stream - The output stream to write the compressed data to.java.io.IOException - IOExceptionprotected abstract java.lang.String getEncoding()