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

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

See:
          Description

Interface Summary
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.
 

Class Summary
ApplicationConfigAdapter An extension of DefaultResourceConfig that adapts an instance of ApplicationConfig.
ClasspathResourceConfig A mutable implementation of DefaultResourceConfig that dynamically searches for root resource classes and providers in the paths declared by the property ClasspathResourceConfig.PROPERTY_CLASSPATH.
DefaultResourceConfig A mutable implementation of ResourceConfig that declares default values for features.
PackagesResourceConfig A mutable implementation of DefaultResourceConfig that dynamically searches for root resource classes given a set of package names.
ResourceConfig The resource configuration for configuring a web application.
 

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 ...
  }

}