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
ConstructorDescriptionBuilder
(OutboundMessageContext context) Create new outbound JAX-RS response builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
cacheControl
(CacheControl cacheControl) static void
Remove 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 void
setBaseUri
(URI baseUri) Set thebaseUri
of 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 thebaseUri
of the actual request into theInheritableThreadLocal
.The
baseUri
will 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
ThreadLocal
clearBaseUri()
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:
build
in classResponse.ResponseBuilder
-
clone
- Specified by:
clone
in classResponse.ResponseBuilder
-
status
- Overrides:
status
in classResponse.ResponseBuilder
-
status
- Specified by:
status
in classResponse.ResponseBuilder
-
status
- Specified by:
status
in classResponse.ResponseBuilder
-
entity
- Specified by:
entity
in classResponse.ResponseBuilder
-
entity
- Specified by:
entity
in classResponse.ResponseBuilder
-
type
- Specified by:
type
in classResponse.ResponseBuilder
-
type
- Specified by:
type
in classResponse.ResponseBuilder
-
variant
- Specified by:
variant
in classResponse.ResponseBuilder
-
variants
- Specified by:
variants
in classResponse.ResponseBuilder
-
language
- Specified by:
language
in classResponse.ResponseBuilder
-
language
- Specified by:
language
in classResponse.ResponseBuilder
-
location
- Specified by:
location
in classResponse.ResponseBuilder
-
contentLocation
- Specified by:
contentLocation
in classResponse.ResponseBuilder
-
encoding
- Specified by:
encoding
in classResponse.ResponseBuilder
-
tag
- Specified by:
tag
in classResponse.ResponseBuilder
-
tag
- Specified by:
tag
in classResponse.ResponseBuilder
-
lastModified
- Specified by:
lastModified
in classResponse.ResponseBuilder
-
cacheControl
- Specified by:
cacheControl
in classResponse.ResponseBuilder
-
expires
- Specified by:
expires
in classResponse.ResponseBuilder
-
cookie
- Specified by:
cookie
in classResponse.ResponseBuilder
-
header
- Specified by:
header
in classResponse.ResponseBuilder
-
variants
- Specified by:
variants
in classResponse.ResponseBuilder
-
links
- Specified by:
links
in classResponse.ResponseBuilder
-
link
- Specified by:
link
in classResponse.ResponseBuilder
-
link
- Specified by:
link
in classResponse.ResponseBuilder
-
allow
- Specified by:
allow
in classResponse.ResponseBuilder
-
allow
- Specified by:
allow
in classResponse.ResponseBuilder
-
replaceAll
- Specified by:
replaceAll
in classResponse.ResponseBuilder
-