Package com.sun.ws.rest.api.core

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

See:
          Description

Interface Summary
Cookie Represents a HTTP cookie.
HttpContext A HttpContext makes it possible for a web resource implementation class to access and manipulate HTTP request and response information directly.
HttpRequestContext An abstraction for a HTTP request
HttpResponseContext Encapsulates the response to a HTTP request.
MultivaluedMap A map of key-values pairs.
PathSegment Represents a URI path segment and any associated matrix parameters.
ResourceConfig Methods describing the set of resources in a Web application.
WebResource Low level interface for implementing web resource classes.
 

Class Summary
CacheControl An abstraction for the value of a HTTP Cache-Control response header.
EntityTag An abstraction for the value of a HTTP Entity Tag, used as the value of an ETag response header.
MediaType An abstraction for a media type.
NewCookie Represents a new cookie that will be sent in a response.
 

Package com.sun.ws.rest.api.core Description

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

@URITemplate("widgets/{widgetid}")
public class WidgetResource extends WebResource {

  public void handleRequest(HTTPRequest request, HTTPResponse response) {
    if (request.getHttpMethod().equals("GET")) {
      String replyStr = "<widget id='"+
        request.getURIParameters().get("widgetId").get(0).getValue()+"'/>";
      StringRepresentation reply = new StringRepresentation(replyStr,
        "application/widgets+xml");
      response.setRepresentation(reply);
    }
    else ...
  }

}