Class GZipPostProcessor
java.lang.Object
org.springframework.amqp.support.postprocessor.AbstractCompressingPostProcessor
org.springframework.amqp.support.postprocessor.AbstractDeflaterPostProcessor
org.springframework.amqp.support.postprocessor.GZipPostProcessor
- All Implemented Interfaces:
MessagePostProcessor, org.springframework.core.Ordered
A post processor that uses a
GZIPOutputStream to compress the message body.
Sets MessageProperties.SPRING_AUTO_DECOMPRESS to
true by default.- Since:
- 1.4.2
-
Field Summary
Fields inherited from class AbstractCompressingPostProcessor
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected OutputStreamgetCompressorStream(OutputStream zipped) Get the stream.protected StringGet the encoding.Methods inherited from class AbstractDeflaterPostProcessor
getLevel, setLevelMethods inherited from class AbstractCompressingPostProcessor
getOrder, postProcessMessage, setCopyProperties, setEncodingDelimiter, setOrderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MessagePostProcessor
postProcessMessage, postProcessMessage
-
Constructor Details
-
GZipPostProcessor
public GZipPostProcessor() -
GZipPostProcessor
public GZipPostProcessor(boolean autoDecompress)
-
-
Method Details
-
getCompressorStream
Description copied from class:AbstractCompressingPostProcessorGet the stream.- Specified by:
getCompressorStreamin classAbstractCompressingPostProcessor- Parameters:
zipped- The output stream to write the compressed data to.- Returns:
- the compressor output stream.
- Throws:
IOException- IOException
-
getEncoding
Description copied from class:AbstractCompressingPostProcessorGet the encoding.- Specified by:
getEncodingin classAbstractCompressingPostProcessor- Returns:
- the content-encoding header.
-