Package com.sun.ws.rest.api

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

See:
          Description

Class Summary
MediaTypes Common media types.
Responses Common status codes and responses.
 

Exception Summary
ConflictException A HTTP 409 (Conflict) exception.
NotFoundException A HTTP 404 (Not Found) exception.
 

Package com.sun.ws.rest.api Description

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

@UriTemplate("widgets/{widgetid}")
@ConsumeMime("application/widgets+xml")
@ProduceMime("application/widgets+xml")
public class WidgetResource {

  @HttpMethod(GET)
  public Representation getWidget(@UriParam("widgetid") String id) {
    String replyStr = getWidgetAsXml(id);
    StringRepresentation reply = new StringRepresentation(replyStr,
      "application/widgets+xml");
    return reply;
  }

  @HttpMethod(PUT)
  public void updateWidget(@UriParam("widgetid") String id,
    Representation<Source> update) {
    updateWidgetFromXml(id, update);
  }

  ...
}