public class GZIPContentEncodingFilter extends java.lang.Object implements ContainerRequestFilter, ContainerResponseFilter
Note that if you're using Entitag for cache control and want to use this filter, you shoud add this filter to both ContainerFilters (Request and Response).<init-param> <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name> <param-value>com.sun.jersey.api.container.filter.GZIPContentEncodingFilter</param-value> </init-param> <init-param> <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name> <param-value>com.sun.jersey.api.container.filter.GZIPContentEncodingFilter</param-value> </init-param>
com.sun.jersey.api.container.filter
Constructor and Description |
---|
GZIPContentEncodingFilter() |
Modifier and Type | Method and Description |
---|---|
ContainerRequest |
filter(ContainerRequest request)
Filter the request.
|
ContainerResponse |
filter(ContainerRequest request,
ContainerResponse response)
Filter the response.
|
public ContainerRequest filter(ContainerRequest request)
ContainerRequestFilter
An implementation may modify the state of the request or create a new instance.
filter
in interface ContainerRequestFilter
request
- the request.public ContainerResponse filter(ContainerRequest request, ContainerResponse response)
ContainerResponseFilter
An implementation may modify the state of the response or return a new instance.
filter
in interface ContainerResponseFilter
request
- the request.response
- the response.Copyright © 2016 Oracle Corporation. All Rights Reserved.