|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
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. |
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);
}
...
}
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||