| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.2) on Wed Sep 23 17:36:24 GMT 2020 --> |
| <title>Overview (jakarta.ws.rs-api 3.0.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2020-09-23"> |
| <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="script.js"></script> |
| <script type="text/javascript" src="jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Overview (jakarta.ws.rs-api 3.0.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var pathtoroot = "./"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li class="navBarCell1Rev">Overview</li> |
| <li>Package</li> |
| <li>Class</li> |
| <li>Use</li> |
| <li><a href="overview-tree.html">Tree</a></li> |
| <li><a href="deprecated-list.html">Deprecated</a></li> |
| <li><a href="index-all.html">Index</a></li> |
| <li><a href="help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <div class="header"> |
| <h1 class="title">Jakarta RESTful Web Services 3.0 API Specification </h1> |
| </div> |
| <main role="main"> |
| <div class="contentContainer"> |
| <div class="block"><p>Jakarta RESTful Web Services provides a foundational API to develop web services |
| following the Representational State Transfer (REST) architectural pattern. |
| This API is distributed under the <a href="resources/EFSL.html">Eclipse Foundation Specification License</a>.</p> |
| |
| <h1>Web resources</h1> |
| |
| <p>JAX-RS core APIs enable developers to rapidly build Web applications in Java that are characteristic |
| of the best designed parts of the Web. The API brings in support for designing and implementing |
| Web resources and application that follow principles of |
| <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST (Representational |
| State Transfer)</a> architectural style to the Java Platform.</p> |
| |
| <p>In JAX-RS, Java POJOs can be exposed as RESTful Web resources independent of the underlying technology |
| using a high level easy-to-use declarative annotation-based API. E.g.:</p> |
| |
| <pre> |
| @Path("widgets/{widgetid}") |
| @Consumes("application/widgets+xml") |
| @Produces("application/widgets+xml") |
| public class WidgetResource { |
| |
| @GET |
| public String getWidget(@PathParam("widgetid") String id) { |
| return getWidgetAsXml(id); |
| } |
| |
| @PUT |
| public void updateWidget(@PathParam("widgetid") String id, |
| Source update) { |
| updateWidgetFromXml(id, update); |
| } |
| |
| ... |
| } |
| </pre> |
| |
| <h1>Web resource clients</h1> |
| |
| <p>JAX-RS client API is a Java based API used to access resources on the Web. It is not restricted |
| to resources implemented using JAX-RS. It provides a higher-level abstraction compared to a |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net" class="externalLink"><code>plain HTTP communication API</code></a> as well as integration with the |
| JAX-RS extension providers, in order to enable concise and efficient implementation of |
| reusable client-side solutions that leverage existing and well |
| established client-side implementations of HTTP-based communication.</p> |
| |
| <p>The JAX-RS Client API also encapsulates the Uniform Interface Constraint – |
| a key constraint of the REST architectural style – and associated data |
| elements as client-side Java artifacts and supports a pluggable architecture |
| by defining multiple extension points.</p> |
| |
| <p>Following example demonstrates a simple JAX-RS client API usage scenario:</p> |
| |
| <pre> |
| Client client = ClientBuilder.newClient(); |
| |
| client.property("MyProperty", "MyValue") |
| .register(MyProvider.class) |
| .enable(MyFeature.class); |
| |
| Response res = client.target("http://example.org/hello").request("text/plain").get(); |
| String message = res.readEntity(String.class); |
| </pre> |
| |
| <h1>Provider extensions</h1> |
| |
| <p>JAX-RS applications may provide custom extensions to the client and server runtime using the |
| common extension APIs defined in <a href="jakarta/ws/rs/ext/package-summary.html">jakarta.ws.rs.ext</a> |
| package, namely entity providers and entity provider interceptors. Additionally, request and |
| response processing chains on client as well as server side can be further customized by |
| implemening custom request and response filters - see the |
| <a href="jakarta/ws/rs/client/ClientRequestFilter.html">ClientRequestFilter</a>, |
| <a href="jakarta/ws/rs/client/ClientResponseFilter.html">ClientResponseFilter</a>, |
| <a href="jakarta/ws/rs/container/ContainerRequestFilter.html">ContainerRequestFilter</a>, |
| <a href="jakarta/ws/rs/container/ContainerResponseFilter.html">ContainerResponseFilter</a> |
| APIs.</p></div> |
| </div> |
| <div class="contentContainer"> |
| <table class="overviewSummary"> |
| <caption><span>Packages</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Package</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor" id="i0"> |
| <th class="colFirst" scope="row"><a href="jakarta/ws/rs/package-summary.html">jakarta.ws.rs</a></th> |
| <td class="colLast"> |
| <div class="block">High-level interfaces and annotations used to create RESTful service resources.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i1"> |
| <th class="colFirst" scope="row"><a href="jakarta/ws/rs/client/package-summary.html">jakarta.ws.rs.client</a></th> |
| <td class="colLast"> |
| <div class="block">The JAX-RS client API</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i2"> |
| <th class="colFirst" scope="row"><a href="jakarta/ws/rs/container/package-summary.html">jakarta.ws.rs.container</a></th> |
| <td class="colLast"> |
| <div class="block">Container-specific JAX-RS API.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i3"> |
| <th class="colFirst" scope="row"><a href="jakarta/ws/rs/core/package-summary.html">jakarta.ws.rs.core</a></th> |
| <td class="colLast"> |
| <div class="block">Low-level interfaces and annotations used to create RESTful service resources.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i4"> |
| <th class="colFirst" scope="row"><a href="jakarta/ws/rs/ext/package-summary.html">jakarta.ws.rs.ext</a></th> |
| <td class="colLast"> |
| <div class="block">APIs that provide extensions to the types supported by the JAX-RS API.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i5"> |
| <th class="colFirst" scope="row"><a href="jakarta/ws/rs/sse/package-summary.html">jakarta.ws.rs.sse</a></th> |
| <td class="colLast"> |
| <div class="block">Server-Sent Events related API.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </main> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li class="navBarCell1Rev">Overview</li> |
| <li>Package</li> |
| <li>Class</li> |
| <li>Use</li> |
| <li><a href="overview-tree.html">Tree</a></li> |
| <li><a href="deprecated-list.html">Deprecated</a></li> |
| <li><a href="index-all.html">Index</a></li> |
| <li><a href="help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small><p align="left">Copyright © 2018, 2020 Eclipse Foundation.<br>Use is subject to <a href="./resources/EFSL.html" target="_top">license terms</a>.</small></p> |
| </footer> |
| </body> |
| </html> |