Package alpine.server.filters
Class GZipInterceptor
java.lang.Object
alpine.server.filters.GZipInterceptor
- All Implemented Interfaces:
jakarta.ws.rs.ext.ReaderInterceptor,jakarta.ws.rs.ext.WriterInterceptor
@Provider
public class GZipInterceptor
extends Object
implements jakarta.ws.rs.ext.ReaderInterceptor, jakarta.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 Summary
ConstructorsConstructorDescriptionGZipInterceptor(@NotNull jakarta.ws.rs.core.HttpHeaders httpHeaders) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionaroundReadFrom(jakarta.ws.rs.ext.ReaderInterceptorContext context) voidaroundWriteTo(jakarta.ws.rs.ext.WriterInterceptorContext context)
-
Constructor Details
-
GZipInterceptor
public GZipInterceptor(@Context @NotNull @NotNull jakarta.ws.rs.core.HttpHeaders httpHeaders) Constructor.- Parameters:
httpHeaders- the The HttpHeaders
-
-
Method Details
-
aroundReadFrom
public Object aroundReadFrom(jakarta.ws.rs.ext.ReaderInterceptorContext context) throws IOException, jakarta.ws.rs.WebApplicationException - Specified by:
aroundReadFromin interfacejakarta.ws.rs.ext.ReaderInterceptor- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-
aroundWriteTo
public void aroundWriteTo(jakarta.ws.rs.ext.WriterInterceptorContext context) throws IOException, jakarta.ws.rs.WebApplicationException - Specified by:
aroundWriteToin interfacejakarta.ws.rs.ext.WriterInterceptor- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-