By default, i.e. if no {@link javax.ws.rs.NameBinding name binding} is appliedto the filter implementation class, the filter instance is applied globally to any outgoing response. If there is a {@code @NameBinding} annotation applied to the filter, the filterwill only be executed for a response for which the request has been matched to a {@link javax.ws.rs.HttpMethod resource or sub-resource method} AND the methodor the whole custom {@link javax.ws.rs.core.Application JAX-RS Application} classis bound to the same name-binding annotation.
Implement a name-bound response filter in cases when you want limit the filter functionality to a matched resource or resource method. In other cases, when the filter should be applied globally to any outgoing response, implement an unbound, global response filter.
Filters implementing this interface must be annotated with {@link javax.ws.rs.ext.Provider @Provider} to be discovered by the JAX-RSruntime. Container response filter instances may also be discovered and bound {@link DynamicFeature dynamically} to particular resource methods.
@author Marek Potociar @author Santiago Pericas-Geertsen @see javax.ws.rs.container.ContainerRequestFilter @since 2.0
|
|
|
|
|
|