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,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
- Author:
- Gary Russell
-
Field Summary
Fields inherited from class org.springframework.amqp.support.postprocessor.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 org.springframework.amqp.support.postprocessor.AbstractDeflaterPostProcessor
getLevel, setLevelMethods inherited from class org.springframework.amqp.support.postprocessor.AbstractCompressingPostProcessor
getOrder, postProcessMessage, setCopyProperties, setEncodingDelimiter, setOrderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.amqp.core.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.
-