Package javax.ws.rs
package javax.ws.rs
High-level interfaces and annotations used to create RESTful service
resources. E.g.:
@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); } ... }
-
ClassDescriptionIdentifies the application path that serves as the base URI for all resource URIs provided by
Path
.Defines the media types that the methods of a resource class orMessageBodyReader
can accept.Binds the value of a HTTP cookie to a resource method parameter, resource class field, or resource class bean property.Defines the default value of request metadata that is bound using one of the following annotations:PathParam
,QueryParam
,MatrixParam
,CookieParam
,FormParam
, orHeaderParam
.Indicates that the annotated method responds to HTTP DELETE requestsDisables automatic decoding of parameter values bound usingQueryParam
,PathParam
,FormParam
orMatrixParam
.Binds the value(s) of a form parameter contained within a request entity body to a resource method parameter.Indicates that the annotated method responds to HTTP GET requestsIndicates that the annotated method responds to HTTP HEAD requestsBinds the value(s) of a HTTP header to a resource method parameter, resource class field, or resource class bean property.Associates the name of a HTTP method with an annotation.Binds the value(s) of a URI matrix parameter to a resource method parameter, resource class field, or resource class bean property.Indicates that the annotated method responds to HTTP OPTIONS requestsIdentifies the URI path that a resource class or class method will serve requests for.Binds the value of a URI template parameter or a path segment containing the template parameter to a resource method parameter, resource class field, or resource class bean property.Indicates that the annotated method responds to HTTP POST requestsDefines the media type(s) that the methods of a resource class orMessageBodyWriter
can produce.Indicates that the annotated method responds to HTTP PUT requestsBinds the value(s) of a HTTP query parameter to a resource method parameter, resource class field, or resource class bean property.Runtime exception for applications.