Class GzipHeaderDecorator

  • All Implemented Interfaces:
    javax.ws.rs.ext.WriterInterceptor

    @Provider
    @Priority(3000)
    public class GzipHeaderDecorator
    extends Object
    implements javax.ws.rs.ext.WriterInterceptor
    Automagically add the Content-Encoding: gzip header to endpoints annotated with GZIP.

    The compression is handled by GZipEncoder.

    • Constructor Detail

      • GzipHeaderDecorator

        public GzipHeaderDecorator()
    • Method Detail

      • aroundWriteTo

        public void aroundWriteTo​(javax.ws.rs.ext.WriterInterceptorContext writerInterceptorContext)
                           throws javax.ws.rs.WebApplicationException,
                                  IOException
        Specified by:
        aroundWriteTo in interface javax.ws.rs.ext.WriterInterceptor
        Throws:
        javax.ws.rs.WebApplicationException
        IOException