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
public class GZipPostProcessor extends AbstractDeflaterPostProcessor
A post processor that uses aGZIPOutputStream
to compress the message body. SetsMessageProperties.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
logger
-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description GZipPostProcessor()
GZipPostProcessor(boolean autoDecompress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OutputStream
getCompressorStream(OutputStream zipped)
Get the stream.protected String
getEncoding()
Get the encoding.-
Methods inherited from class org.springframework.amqp.support.postprocessor.AbstractDeflaterPostProcessor
getLevel, setLevel
-
Methods inherited from class org.springframework.amqp.support.postprocessor.AbstractCompressingPostProcessor
getOrder, postProcessMessage, setCopyProperties, setEncodingDelimiter, setOrder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.amqp.core.MessagePostProcessor
postProcessMessage, postProcessMessage
-
-
-
-
Method Detail
-
getCompressorStream
protected OutputStream getCompressorStream(OutputStream zipped) throws IOException
Description copied from class:AbstractCompressingPostProcessor
Get the stream.- Specified by:
getCompressorStream
in classAbstractCompressingPostProcessor
- Parameters:
zipped
- The output stream to write the compressed data to.- Returns:
- the compressor output stream.
- Throws:
IOException
- IOException
-
getEncoding
protected String getEncoding()
Description copied from class:AbstractCompressingPostProcessor
Get the encoding.- Specified by:
getEncoding
in classAbstractCompressingPostProcessor
- Returns:
- the content-encoding header.
-
-