A class used to build Response instances that contain metadata instead of or in addition to an entity. An initial instance may be obtained via static methods of the Response class, instance methods provide the ability to set metadata. E.g. to create a response that indicates the creation of a new resource:
@POST Response addWidget(...) { Widget w = ... URI widgetId = UriBuilder.fromResource(Widget.class)... return Response.created(widgetId).build(); }
Several methods have parameters of type URI, {@link UriBuilder} providesconvenient methods to create such values as does {@code URI.create()}.
Where multiple variants of the same method are provided, the type of the supplied parameter is retained in the metadata of the built {@code Response}.