Class OutboundJaxrsResponse.Builder
java.lang.Object
jakarta.ws.rs.core.Response.ResponseBuilder
org.glassfish.jersey.message.internal.OutboundJaxrsResponse.Builder
- Enclosing class:
- OutboundJaxrsResponse
Outbound JAX-RS
Response.ResponseBuilder implementation.
The implementation delegates method calls to an underlying
outbound message context. Upon a call to a build() method
a new instance of OutboundJaxrsResponse is produced.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(OutboundMessageContext context) Create new outbound JAX-RS response builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()cacheControl(CacheControl cacheControl) static voidRemove the current thread's value for baseUri thread-local variable (set bysetBaseUri(java.net.URI)).clone()contentLocation(URI location) entity(Object entity, Annotation[] annotations) lastModified(Date lastModified) replaceAll(MultivaluedMap<String, Object> headers) static voidsetBaseUri(URI baseUri) Set thebaseUriof the actual request into theInheritableThreadLocal.status(int code) status(Response.StatusType status) Methods inherited from class jakarta.ws.rs.core.Response.ResponseBuilder
newInstance, status
-
Constructor Details
-
Builder
Create new outbound JAX-RS response builder.- Parameters:
context- underlying outbound message context.
-
-
Method Details
-
setBaseUri
Set thebaseUriof the actual request into theInheritableThreadLocal.The
baseUriwill be used for absolutizing the location header content in case that only a relative URI is provided.After resource method invocation when the value is not needed any more to be stored in
ThreadLocalclearBaseUri()should be called for cleanup in order to prevent possible memory leaks.- Parameters:
baseUri- - baseUri of the actual request- Since:
- 2.4
- See Also:
-
clearBaseUri
public static void clearBaseUri()Remove the current thread's value for baseUri thread-local variable (set bysetBaseUri(java.net.URI)). Should be called after resource method invocation for cleanup.- Since:
- 2.4
- See Also:
-
build
- Specified by:
buildin classResponse.ResponseBuilder
-
clone
- Specified by:
clonein classResponse.ResponseBuilder
-
status
- Overrides:
statusin classResponse.ResponseBuilder
-
status
- Specified by:
statusin classResponse.ResponseBuilder
-
status
- Specified by:
statusin classResponse.ResponseBuilder
-
entity
- Specified by:
entityin classResponse.ResponseBuilder
-
entity
- Specified by:
entityin classResponse.ResponseBuilder
-
type
- Specified by:
typein classResponse.ResponseBuilder
-
type
- Specified by:
typein classResponse.ResponseBuilder
-
variant
- Specified by:
variantin classResponse.ResponseBuilder
-
variants
- Specified by:
variantsin classResponse.ResponseBuilder
-
language
- Specified by:
languagein classResponse.ResponseBuilder
-
language
- Specified by:
languagein classResponse.ResponseBuilder
-
location
- Specified by:
locationin classResponse.ResponseBuilder
-
contentLocation
- Specified by:
contentLocationin classResponse.ResponseBuilder
-
encoding
- Specified by:
encodingin classResponse.ResponseBuilder
-
tag
- Specified by:
tagin classResponse.ResponseBuilder
-
tag
- Specified by:
tagin classResponse.ResponseBuilder
-
lastModified
- Specified by:
lastModifiedin classResponse.ResponseBuilder
-
cacheControl
- Specified by:
cacheControlin classResponse.ResponseBuilder
-
expires
- Specified by:
expiresin classResponse.ResponseBuilder
-
cookie
- Specified by:
cookiein classResponse.ResponseBuilder
-
header
- Specified by:
headerin classResponse.ResponseBuilder
-
variants
- Specified by:
variantsin classResponse.ResponseBuilder
-
links
- Specified by:
linksin classResponse.ResponseBuilder
-
link
- Specified by:
linkin classResponse.ResponseBuilder
-
link
- Specified by:
linkin classResponse.ResponseBuilder
-
allow
- Specified by:
allowin classResponse.ResponseBuilder
-
allow
- Specified by:
allowin classResponse.ResponseBuilder
-
replaceAll
- Specified by:
replaceAllin classResponse.ResponseBuilder
-