public abstract class AbstractDecompressingPostProcessor extends 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 InputStream |
getDecompressorStream(InputStream stream)
Get the stream.
|
protected abstract String |
getEncoding()
Get the encoding.
|
int |
getOrder() |
Message |
postProcessMessage(Message message)
Change (or replace) the message.
|
protected void |
setOrder(int order)
Set the order.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostProcessMessagepublic 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
MessagePostProcessorpostProcessMessage in interface MessagePostProcessormessage - the message.AmqpException - an exception.protected abstract InputStream getDecompressorStream(InputStream stream) throws IOException
stream - The output stream to write the compressed data to.IOException - IOExceptionprotected abstract String getEncoding()