You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2013/11/21 17:48:51 UTC

svn commit: r887564 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-basics.html

Author: buildbot
Date: Thu Nov 21 16:48:50 2013
New Revision: 887564

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/jax-rs-basics.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/jax-rs-basics.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-basics.html (original)
+++ websites/production/cxf/content/docs/jax-rs-basics.html Thu Nov 21 16:48:50 2013
@@ -133,23 +133,58 @@ Apache CXF -- JAX-RS Basics
 <div id="ConfluenceContent"><p><span style="font-size:2em;font-weight:bold"> JAX-RS : Understanding the Basics </span></p>
 
 <div>
-<ul><li><a shape="rect" href="#JAX-RSBasics-WhatisNewinJAXRS2.0">What is New in JAX-RS 2.0</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-ClientAPI">Client API</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-AsynchronousAPI">Asynchronous API</a></li><li><a shape="rect" href="#JAX-RSBasics-Responseinterfaceupdates">Response interface updates</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Filters">Filters</a></li><li><a shape="rect" href="#JAX-RSBasics-Interceptors">Interceptors</a></li><li><a shape="rect" href="#JAX-RSBasics-DynamicFeatures">Dynamic Features</a></li><li><a shape="rect" href="#JAX-RSBasics-Exceptions">Exceptions</a></li><li><a shape="rect" href="#JAX-RSBasics-Suspendedinvocations">Suspended invocations</a></li><li><a shape="rect" href="#JAX-RSBasics-Parameterconverters">Parameter converters</a></li><li><a shape="rect" href="#JAX-RSBasics-Beanparameters">Bean parameters</a></li><li><a shape="rect" href="#JAX-RSBasics-Updatestothematchingalgorithm">Update
 s to the matching algorithm</a></li><li><a shape="rect" href="#JAX-RSBasics-Injectionintosubresources">Injection into subresources</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Resourceclass">Resource class</a></li><li><a shape="rect" href="#JAX-RSBasics-@Path">@Path</a></li><li><a shape="rect" href="#JAX-RSBasics-HTTPMethod">HTTP Method</a></li><li><a shape="rect" href="#JAX-RSBasics-Returntypes">Return types</a></li><li><a shape="rect" href="#JAX-RSBasics-Exceptionhandling">Exception handling</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-MappingexceptionsthrownfromCXFinterceptors">Mapping exceptions thrown from CXF interceptors</a></li><li><a shape="rect" href="#JAX-RSBasics-CustomizingdefaultWebApplicationExceptionmapper">Customizing default WebApplicationException mapper</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-DealingwithParameters">Dealing with Parameters</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Parameterbeans">Parameter beans</a></li></ul><
 li><a shape="rect" href="#JAX-RSBasics-Resourcelifecycles">Resource lifecycles</a></li><li><a shape="rect" href="#JAX-RSBasics-Overviewoftheselectionalgorithm.">Overview of the selection algorithm.</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Selectingbetweenmultipleresourceclasses">Selecting between multiple resource classes</a></li><li><a shape="rect" href="#JAX-RSBasics-Selectingbetweenmultipleresourcemethods">Selecting between multiple resource methods</a></li><li><a shape="rect" href="#JAX-RSBasics-Resourcemethodsandmediatypes">Resource methods and media types</a></li><li><a shape="rect" href="#JAX-RSBasics-Customselectionbetweenmultipleresources">Custom selection between multiple resources</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Contextannotations">Context annotations</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-CustomContexts">Custom Contexts</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-URIcalculationusingUriInfoandUriBuilder">URI calculatio
 n using UriInfo and UriBuilder</a></li><li><a shape="rect" href="#JAX-RSBasics-Annotationinheritance">Annotation inheritance</a></li><li><a shape="rect" href="#JAX-RSBasics-Subresourcelocators.">Sub-resource locators.</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Staticresolutionofsubresources">Static resolution of subresources</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-MessageBodyProviders">Message Body Providers</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-CustomMessageBodyProviders">Custom Message Body Providers</a></li><li><a shape="rect" href="#JAX-RSBasics-Registeringcustomproviders">Registering custom providers</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Customizingmediatypesformessagebodyproviders">Customizing media types for message body providers</a></li><li><a shape="rect" href="#JAX-RSBasics-AdvancedHTTP">Advanced HTTP</a></li></ul></div>
+<ul><li><a shape="rect" href="#JAX-RSBasics-WhatisNewinJAXRS2.0">What is New in JAX-RS 2.0</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Filters">Filters</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Server">Server</a></li><li><a shape="rect" href="#JAX-RSBasics-Client">Client</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Interceptors">Interceptors</a></li><li><a shape="rect" href="#JAX-RSBasics-DynamicFeatures">Dynamic Features</a></li><li><a shape="rect" href="#JAX-RSBasics-Exceptions">Exceptions</a></li><li><a shape="rect" href="#JAX-RSBasics-Suspendedinvocations">Suspended invocations</a></li><li><a shape="rect" href="#JAX-RSBasics-Parameterconverters">Parameter converters</a></li><li><a shape="rect" href="#JAX-RSBasics-Beanparameters">Bean parameters</a></li><li><a shape="rect" href="#JAX-RSBasics-Updatestothematchingalgorithm">Updates to the matching algorithm</a></li><li><a shape="rect" href="#JAX-RSBasics-Injectionintosubresources">Injection into subresour
 ces</a></li><li><a shape="rect" href="#JAX-RSBasics-ClientAPI">Client API</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-AsynchronousInvocations">Asynchronous Invocations</a></li><li><a shape="rect" href="#JAX-RSBasics-Responseinterfaceupdates">Response interface updates</a></li></ul></ul><li><a shape="rect" href="#JAX-RSBasics-Resourceclass">Resource class</a></li><li><a shape="rect" href="#JAX-RSBasics-@Path">@Path</a></li><li><a shape="rect" href="#JAX-RSBasics-HTTPMethod">HTTP Method</a></li><li><a shape="rect" href="#JAX-RSBasics-Returntypes">Return types</a></li><li><a shape="rect" href="#JAX-RSBasics-Exceptionhandling">Exception handling</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-MappingexceptionsthrownfromCXFinterceptors">Mapping exceptions thrown from CXF interceptors</a></li><li><a shape="rect" href="#JAX-RSBasics-CustomizingdefaultWebApplicationExceptionmapper">Customizing default WebApplicationException mapper</a></li></ul><li><a shape="rect" href="#JAX-RSB
 asics-DealingwithParameters">Dealing with Parameters</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Parameterbeans">Parameter beans</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Resourcelifecycles">Resource lifecycles</a></li><li><a shape="rect" href="#JAX-RSBasics-Overviewoftheselectionalgorithm.">Overview of the selection algorithm.</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Selectingbetweenmultipleresourceclasses">Selecting between multiple resource classes</a></li><li><a shape="rect" href="#JAX-RSBasics-Selectingbetweenmultipleresourcemethods">Selecting between multiple resource methods</a></li><li><a shape="rect" href="#JAX-RSBasics-Resourcemethodsandmediatypes">Resource methods and media types</a></li><li><a shape="rect" href="#JAX-RSBasics-Customselectionbetweenmultipleresources">Custom selection between multiple resources</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Contextannotations">Context annotations</a></li><ul><li><a shape="rect" href="#JA
 X-RSBasics-CustomContexts">Custom Contexts</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-URIcalculationusingUriInfoandUriBuilder">URI calculation using UriInfo and UriBuilder</a></li><li><a shape="rect" href="#JAX-RSBasics-Annotationinheritance">Annotation inheritance</a></li><li><a shape="rect" href="#JAX-RSBasics-Subresourcelocators.">Sub-resource locators.</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Staticresolutionofsubresources">Static resolution of subresources</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-MessageBodyProviders">Message Body Providers</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-CustomMessageBodyProviders">Custom Message Body Providers</a></li><li><a shape="rect" href="#JAX-RSBasics-Registeringcustomproviders">Registering custom providers</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Customizingmediatypesformessagebodyproviders">Customizing media types for message body providers</a></li><li><a shape="rect" href="#JAX-RSBasics
 -AdvancedHTTP">Advanced HTTP</a></li></ul></div>
 
 <h1><a shape="rect" name="JAX-RSBasics-WhatisNewinJAXRS2.0"></a>What is New in JAX-RS 2.0</h1>
 
-<h2><a shape="rect" name="JAX-RSBasics-ClientAPI"></a>Client API</h2>
-<h3><a shape="rect" name="JAX-RSBasics-AsynchronousAPI"></a>Asynchronous API</h3>
-<h3><a shape="rect" name="JAX-RSBasics-Responseinterfaceupdates"></a>Response interface updates</h3>
-
 <h2><a shape="rect" name="JAX-RSBasics-Filters"></a>Filters</h2>
+
+<h3><a shape="rect" name="JAX-RSBasics-Server"></a>Server</h3>
+
+<p><a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/ContainerRequestFilter.html" rel="nofollow">ContainerRequestFilter</a> and <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/ContainerResponseFilter.html" rel="nofollow">ContainerResponseFilter</a> are new server-side request and response filters which can be used to customize various properties of a given request and response.</p>
+
+<p>ContainerRequestFilter annotated with a <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/PreMatching.html" rel="nofollow">PreMatching</a> annotation will be run before the runtime has matched a request to a specific JAX-RS root resource and method. Prematching filters can be used to affect the matching process.  </p>
+
+<p>The request filters without the PreMatching annotation will run after the JAX-RS resource method has been selected. </p>
+
+<p>ContainerRequestFilter can be used to <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/ContainerRequestContext.html#abortWith(javax.ws.rs.core.Response)" rel="nofollow">block</a> a request.</p>
+
+<p>The filters can be bound to individual resource methods only with the help of custom <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/NameBinding.html" rel="nofollow">NameBinding</a>s.</p>
+
+<p>Multiple request and response filters can be executed in the specific order by using javax.annotation.Priority annotations. See <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/Priorities.html" rel="nofollow">Priorities</a> for more information. Request filters are sorted in the ascending order, response filters - in the descending order.  </p>
+
+<h3><a shape="rect" name="JAX-RSBasics-Client"></a>Client</h3>
+
+<p><a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/ClientRequestFilter.html" rel="nofollow">ClientRequestFilter</a> and <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/ClientResponseFilter.html" rel="nofollow">ClientResponseFilter</a> are new client-side request and response filters which can be used to customize various properties of a given request and response.</p>
+
+<p>ClientRequestFilter can be used to <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/ClientRequestContext.html#abortWith(javax.ws.rs.core.Response)" rel="nofollow">block</a> a request.</p>
+
+<p>Request filters are sorted in the ascending order, response filters - in the descending order. See <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/Priorities.html" rel="nofollow">Priorities</a> for more information.</p>
+
 <h2><a shape="rect" name="JAX-RSBasics-Interceptors"></a>Interceptors</h2>
+
+<p><a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/ext/ReaderInterceptor.html" rel="nofollow">ReaderInterceptor</a> and <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/ext/WriterInterceptor.html" rel="nofollow">WriterInterceptor</a> can be used in addition to filters or on its own to customize requests and responses on server and client sides. </p>
+
+<p>Interceptors can be useful to customize the reading/writing process and block JAX-RS MessageBodyWriter or MessageBodyReader providers. </p>
+
+<p>The interceptors used on the server side can be bound to individual resource methods only with the help of custom <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/NameBinding.html" rel="nofollow">NameBinding</a>s.</p>
+
+<p>All interceptors are sorted in the ascending order. See <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/Priorities.html" rel="nofollow">Priorities</a> for more information.</p>
+
 <h2><a shape="rect" name="JAX-RSBasics-DynamicFeatures"></a>Dynamic Features</h2>
+
+
+
 <h2><a shape="rect" name="JAX-RSBasics-Exceptions"></a>Exceptions</h2>
 <h2><a shape="rect" name="JAX-RSBasics-Suspendedinvocations"></a>Suspended invocations</h2>
 <h2><a shape="rect" name="JAX-RSBasics-Parameterconverters"></a>Parameter converters</h2>
 <h2><a shape="rect" name="JAX-RSBasics-Beanparameters"></a>Bean parameters</h2>
 <h2><a shape="rect" name="JAX-RSBasics-Updatestothematchingalgorithm"></a>Updates to the matching algorithm</h2>
 <h2><a shape="rect" name="JAX-RSBasics-Injectionintosubresources"></a>Injection into subresources</h2>
+<h2><a shape="rect" name="JAX-RSBasics-ClientAPI"></a>Client API</h2>
+<h3><a shape="rect" name="JAX-RSBasics-AsynchronousInvocations"></a>Asynchronous Invocations</h3>
+<h3><a shape="rect" name="JAX-RSBasics-Responseinterfaceupdates"></a>Response interface updates</h3>
+
 
 <h1><a shape="rect" name="JAX-RSBasics-Resourceclass"></a>Resource class</h1>