Package javax.ws.rs

High-level interfaces and annotations used to create RESTful service resources.

See:
          Description

Exception Summary
WebApplicationException Runtime exception for applications.
 

Annotation Types Summary
ConsumeMime Defines the MIME types that the methods of a resource class or MessageBodyReader can accept.
CookieParam Binds the value of a HTTP cookie to a Java method parameter.
DefaultValue Defines the default value of a method parameter that is bound from a URI query or matrix parameter or a HTTP header using the @QueryParam, @MatrixParam, @CookieParam or @HeaderParam annotations respectively.
DELETE Indicates that the annotated method responds to HTTP DELETE requests
Encoded Disables automatic decoding of QueryParam, PathParam and MatrixParam values.
GET Indicates that the annotated method responds to HTTP GET requests
HEAD Indicates that the annotated method responds to HTTP HEAD requests
HeaderParam Binds a HTTP header to a Java method parameter.
HttpMethod Associates the name of a HTTP method with an annotation.
MatrixParam Binds a URI matrix parameter to a Java method parameter.
Path Identifies the URI path that a resource class or class method will serve requests for.
PathParam Binds a method parameter to a URI template parameter value or a path segment containing the template parameter.
POST Indicates that the annotated method responds to HTTP POST requests
ProduceMime Defines the MIME type(s) that the methods of a resource class or MessageBodyWriter can produce.
PUT Indicates that the annotated method responds to HTTP PUT requests
QueryParam Binds a HTTP query parameter to a Java method parameter.
 

Package javax.ws.rs Description

High-level interfaces and annotations used to create RESTful service resources. E.g.:

@Path("widgets/{widgetid}")
@ConsumeMime("application/widgets+xml")
@ProduceMime("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);
  }

  ...
}