|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.ws.rs.core.Response.ResponseBuilder
com.sun.jersey.core.spi.factory.ResponseBuilderImpl
public final class ResponseBuilderImpl
An implementation of Response.ResponseBuilder.
| Constructor Summary | |
|---|---|
ResponseBuilderImpl()
|
|
| Method Summary | |
|---|---|
Response |
build()
Create a Response instance from the current ResponseBuilder. |
Response.ResponseBuilder |
cacheControl(CacheControl cacheControl)
Set the cache control data on the ResponseBuilder. |
Response.ResponseBuilder |
clone()
Create a copy of the ResponseBuilder preserving its state. |
Response.ResponseBuilder |
contentLocation(java.net.URI location)
Set the content location on the ResponseBuilder. |
Response.ResponseBuilder |
cookie(NewCookie... cookies)
Add cookies to the ResponseBuilder. |
Response.ResponseBuilder |
encoding(java.lang.String encoding)
|
Response.ResponseBuilder |
entity(java.lang.Object entity)
Set the entity on the ResponseBuilder. |
Response.ResponseBuilder |
entityWithType(java.lang.Object entity,
java.lang.reflect.Type entityType)
|
Response.ResponseBuilder |
expires(java.util.Date expires)
Set the expires date on the ResponseBuilder. |
Response.ResponseBuilder |
header(java.lang.String name,
java.lang.Object value)
Add a header to the ResponseBuilder. |
Response.ResponseBuilder |
header(java.lang.String name,
java.lang.Object value,
boolean single)
|
Response.ResponseBuilder |
headerSingle(java.lang.String name,
java.lang.Object value)
|
Response.ResponseBuilder |
language(java.util.Locale language)
Set the language on the ResponseBuilder. |
Response.ResponseBuilder |
language(java.lang.String language)
Set the language on the ResponseBuilder. |
Response.ResponseBuilder |
lastModified(java.util.Date lastModified)
Set the last modified date on the ResponseBuilder. |
Response.ResponseBuilder |
location(java.net.URI location)
Set the location on the ResponseBuilder. |
Response.ResponseBuilder |
status(int status)
Set the status on the ResponseBuilder. |
Response.ResponseBuilder |
status(Response.StatusType status)
Set the status on the ResponseBuilder. |
Response.ResponseBuilder |
tag(EntityTag tag)
Set an entity tag on the ResponseBuilder. |
Response.ResponseBuilder |
tag(java.lang.String tag)
Set a strong entity tag on the ResponseBuilder. |
Response.ResponseBuilder |
type(MediaType type)
Set the response media type on the ResponseBuilder. |
Response.ResponseBuilder |
type(java.lang.String type)
Set the response media type on the ResponseBuilder. |
Response.ResponseBuilder |
variant(Variant variant)
Set representation metadata on the ResponseBuilder. |
Response.ResponseBuilder |
variants(java.util.List<Variant> variants)
Add a Vary header that lists the available variants. |
| Methods inherited from class javax.ws.rs.core.Response.ResponseBuilder |
|---|
newInstance, status |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResponseBuilderImpl()
| Method Detail |
|---|
public Response.ResponseBuilder entityWithType(java.lang.Object entity,
java.lang.reflect.Type entityType)
public Response build()
Response.ResponseBuilder
build in class Response.ResponseBuilderpublic Response.ResponseBuilder clone()
Response.ResponseBuilder
clone in class Response.ResponseBuilderpublic Response.ResponseBuilder status(Response.StatusType status)
Response.ResponseBuilder
status in class Response.ResponseBuilderstatus - the response status
public Response.ResponseBuilder status(int status)
Response.ResponseBuilder
status in class Response.ResponseBuilderstatus - the response status
public Response.ResponseBuilder entity(java.lang.Object entity)
Response.ResponseBuilderGenericEntity if preservation of its generic type is required.
entity in class Response.ResponseBuilderentity - the response entity
public Response.ResponseBuilder type(MediaType type)
Response.ResponseBuilder
type in class Response.ResponseBuildertype - the media type of the response entity, if null any
existing value for type will be removed
public Response.ResponseBuilder type(java.lang.String type)
Response.ResponseBuilder
type in class Response.ResponseBuildertype - the media type of the response entity, if null any
existing value for type will be removed
public Response.ResponseBuilder variant(Variant variant)
Response.ResponseBuilder
variant in class Response.ResponseBuildervariant - metadata of the response entity, a null value is
equivalent to a variant with all null properties.
public Response.ResponseBuilder variants(java.util.List<Variant> variants)
Response.ResponseBuilder
variants in class Response.ResponseBuildervariants - a list of available representation variants, a null
value will remove an existing value for vary.
public Response.ResponseBuilder language(java.lang.String language)
Response.ResponseBuilder
language in class Response.ResponseBuilderlanguage - the language of the response entity, if null any
existing value for language will be removed
public Response.ResponseBuilder language(java.util.Locale language)
Response.ResponseBuilder
language in class Response.ResponseBuilderlanguage - the language of the response entity, if null any
existing value for type will be removed
public Response.ResponseBuilder location(java.net.URI location)
Response.ResponseBuilder
location in class Response.ResponseBuilderlocation - the location. If a relative URI is
supplied it will be converted into an absolute URI by resolving it
relative to the base URI of the application (see
UriInfo.getBaseUri()). If null any
existing value for location will be removed.
public Response.ResponseBuilder contentLocation(java.net.URI location)
Response.ResponseBuilder
contentLocation in class Response.ResponseBuilderlocation - the content location. Relative or absolute URIs
may be used for the value of content location. If null any
existing value for content location will be removed.
public Response.ResponseBuilder encoding(java.lang.String encoding)
public Response.ResponseBuilder tag(EntityTag tag)
Response.ResponseBuilder
tag in class Response.ResponseBuildertag - the entity tag, if null any
existing entity tag value will be removed.
public Response.ResponseBuilder tag(java.lang.String tag)
Response.ResponseBuildertag(new EntityTag(value)).
tag in class Response.ResponseBuildertag - the string content of a strong entity tag. The JAX-RS
runtime will quote the supplied value when creating the header. If
null any existing entity tag value will be removed.
public Response.ResponseBuilder lastModified(java.util.Date lastModified)
Response.ResponseBuilder
lastModified in class Response.ResponseBuilderlastModified - the last modified date, if null any existing
last modified value will be removed.
public Response.ResponseBuilder cacheControl(CacheControl cacheControl)
Response.ResponseBuilder
cacheControl in class Response.ResponseBuildercacheControl - the cache control directives, if null removes any
existing cache control directives.
public Response.ResponseBuilder expires(java.util.Date expires)
Response.ResponseBuilder
expires in class Response.ResponseBuilderexpires - the expiration date, if null removes any existing
expires value.
public Response.ResponseBuilder cookie(NewCookie... cookies)
Response.ResponseBuilder
cookie in class Response.ResponseBuildercookies - new cookies that will accompany the response. A null
value will remove all cookies, including those added via the
Response.ResponseBuilder.header(java.lang.String, java.lang.Object) method.
public Response.ResponseBuilder header(java.lang.String name,
java.lang.Object value)
Response.ResponseBuilder
header in class Response.ResponseBuildername - the name of the headervalue - the value of the header, the header will be serialized
using a RuntimeDelegate.HeaderDelegate if
one is available via
RuntimeDelegate.createHeaderDelegate(java.lang.Class)
for the class of value or using its toString method if a
header delegate is not available. If value is null then all
current headers of the same name will be removed.
public Response.ResponseBuilder headerSingle(java.lang.String name,
java.lang.Object value)
public Response.ResponseBuilder header(java.lang.String name,
java.lang.Object value,
boolean single)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||