Class GZipInterceptor

java.lang.Object
alpine.server.filters.GZipInterceptor
All Implemented Interfaces:
javax.ws.rs.ext.ReaderInterceptor, javax.ws.rs.ext.WriterInterceptor

@Provider public class GZipInterceptor extends Object implements javax.ws.rs.ext.ReaderInterceptor, javax.ws.rs.ext.WriterInterceptor
Provides a way to gzip the response if the client can accept a gzip response.
Since:
1.0.0
Author:
Steve Springett
  • Constructor Details

    • GZipInterceptor

      public GZipInterceptor(@Context @NotNull @NotNull javax.ws.rs.core.HttpHeaders httpHeaders)
      Constructor.
      Parameters:
      httpHeaders - the The HttpHeaders
  • Method Details

    • aroundReadFrom

      public Object aroundReadFrom(javax.ws.rs.ext.ReaderInterceptorContext context) throws IOException, javax.ws.rs.WebApplicationException
      Specified by:
      aroundReadFrom in interface javax.ws.rs.ext.ReaderInterceptor
      Throws:
      IOException
      javax.ws.rs.WebApplicationException
    • aroundWriteTo

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