EntityResponse.Builder implementation.
| Modifier and Type | Class and Description |
|---|---|
| private static class | DefaultEntityResponseBuilder.
|
| private static class | DefaultEntityResponseBuilder.
Default |
| private static class | DefaultEntityResponseBuilder.
|
| Modifier and Type | Field and Description |
|---|---|
| private final MultiValueMap | |
| private final T | |
| private final Type | |
| private final HttpHeaders | |
| private static final Type | |
| private HttpStatusCode |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public EntityResponse. | allow(HttpMethod...
the allowed methods allowedMethods)Implements org. Set the set of allowed |
| public EntityResponse. | allow(Set<HttpMethod>
the allowed methods allowedMethods)Implements org. Set the set of allowed |
| public EntityResponse | build()
Implements org. Build the response. |
| public EntityResponse. | cacheControl(CacheControl
a builder for cache-related HTTP response headers cacheControl)Implements org. Set the caching directives for the resource, as specified by the HTTP 1.1
|
| public EntityResponse. | contentLength(long
the content length contentLength)Implements org. Set the length of the body in bytes, as specified by the
|
| public EntityResponse. | contentType(MediaType
the content type contentType)Implements org. Set the media type of the body, as specified by the
|
| public EntityResponse. | cookie(Cookie
the cookie to add cookie)Implements org. Add the given cookie to the response. |
| public EntityResponse. | cookies(Consumer<MultiValueMap<String, Cookie>>
a function that consumes the cookies cookiesConsumer)Implements org. Manipulate this response's cookies with the given consumer. |
| public EntityResponse. | eTag(String
the new entity tag etag)Implements org. Set the entity tag of the body, as specified by the |
| public static <T> EntityResponse. | |
| public static <T> EntityResponse. | fromObject(T t, ParameterizedTypeReference<?> bodyType)
Return a new |
| public EntityResponse. | header(String
the header name headerName, String... the header value(s) headerValues)Implements org. Add the given header value(s) under the given name. |
| public EntityResponse. | headers(Consumer<HttpHeaders>
a function that consumes the headersConsumer)HttpHeadersImplements org. Manipulate this response's headers with the given consumer. |
| public EntityResponse. | lastModified(ZonedDateTime
the last modified date lastModified)Implements org. Set the time the resource was last changed, as specified by the
|
| public EntityResponse. | lastModified(Instant
the last modified date lastModified)Implements org. Set the time the resource was last changed, as specified by the
|
| public EntityResponse. | location(URI
the location location)Implements org. Set the location of a resource, as specified by the |
| public EntityResponse. | status(HttpStatusCode
the response status status)Implements org. Set the HTTP status. |
| public EntityResponse. | status(int
the response status status)Implements org. Set the HTTP status. |
| public EntityResponse. | varyBy(String...
request header names requestHeaders)Implements org. Configure one or more request header names (e.g. "Accept-Language") to add to the "Vary" response header to inform clients that the response is subject to content negotiation and variances based on the value of the given request headers. |