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 resource method parameter, resource class field, or resource class bean property.
DefaultValue Defines the default value of request metadata that is bound using one of the following annotations: PathParam, QueryParam, MatrixParam, CookieParam, or HeaderParam.
DELETE Indicates that the annotated method responds to HTTP DELETE requests
Encoded Disables automatic decoding of values bound using either QueryParam, PathParam or MatrixParam.
GET Indicates that the annotated method responds to HTTP GET requests
HEAD Indicates that the annotated method responds to HTTP HEAD requests
HeaderParam Binds the value(s) of a HTTP header to a resource method parameter, resource class field, or resource class bean property.
HttpMethod Associates the name of a HTTP method with an annotation.
MatrixParam Binds the value(s) of a URI matrix parameter to a resource method parameter, resource class field, or resource class bean property.
Path Identifies the URI path that a resource class or class method will serve requests for.
PathParam 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.
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 the value(s) of a HTTP query parameter to a resource method parameter, resource class field, or resource class bean property.
 

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);
  }

  ...
}



Copyright © 2008. All Rights Reserved.