javax.ws.rs.ext
Interface PreMatchRequestFilter


public interface PreMatchRequestFilter

Interface implemented by filters invoked at the PreMatch extension point. Use a filter of this type to update the input to the JAX-RS matching algorithm, e.g., the HTTP method, Accept header, etc. Otherwise, the use of a filter invoked at the Pre extension point (after resource matching) is recommended.

Filters implementing this interface MUST be annotated with Provider. This type of filters is supported only as part of the Server API.

Since:
2.0
Author:
Santiago Pericas-Geertsen
See Also:
RequestFilter

Method Summary
 void preMatchFilter(FilterContext context)
          Filter method called at the PreMatch extension point.
 

Method Detail

preMatchFilter

void preMatchFilter(FilterContext context)
                    throws IOException

Filter method called at the PreMatch extension point. I.e., before resource matching as part of the Server API. This type of filters are not supported in the Client API.

Filters in a chain are ordered according to their binding priority (see BindingPriority). If a pre-match request filter produces a response by calling FilterContext.setResponse(javax.ws.rs.core.Response), the execution of the pre-match request chain is stopped and the response is returned without matching a resource method. For example, a caching filter may produce a response in this way. Note that responses produced in this manner are still processed by the response filter chain.

Parameters:
context - invocation context.
Throws:
IOException - if an I/O exception occurs.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.