Class OutboundJaxrsResponse
java.lang.Object
jakarta.ws.rs.core.Response
org.glassfish.jersey.message.internal.OutboundJaxrsResponse
- All Implemented Interfaces:
AutoCloseable
An outbound JAX-RS response message.
The implementation delegates method calls to an
underlying
outbound message context
.- Author:
- Marek Potociar
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Outbound JAX-RSResponse.ResponseBuilder
implementation.Nested classes/interfaces inherited from class jakarta.ws.rs.core.Response
Response.ResponseBuilder, Response.Status, Response.StatusType
-
Constructor Summary
ConstructorDescriptionOutboundJaxrsResponse
(Response.StatusType status, OutboundMessageContext context) Create new outbound JAX-RS response message instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
close()
static OutboundJaxrsResponse
Deprecated.static OutboundJaxrsResponse
from
(Response response, Configuration configuration) Get an OutboundJaxrsResponse instance for a given JAX-RS response.Get the underlying outbound message context.getDate()
getHeaderString
(String name) int
getLinkBuilder
(String relation) getLinks()
int
boolean
boolean
<T> T
readEntity
(GenericType<T> entityType) <T> T
readEntity
(GenericType<T> entityType, Annotation[] annotations) <T> T
readEntity
(Class<T> type) <T> T
readEntity
(Class<T> type, Annotation[] annotations) toString()
Methods inherited from class jakarta.ws.rs.core.Response
accepted, accepted, created, fromResponse, getHeaders, isClosed, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, seeOther, serverError, status, status, status, status, temporaryRedirect
-
Constructor Details
-
OutboundJaxrsResponse
Create new outbound JAX-RS response message instance.- Parameters:
status
- response status.context
- underlying outbound message context.
-
-
Method Details
-
from
Get an OutboundJaxrsResponse instance for a given JAX-RS response.- Parameters:
response
- response instance to from.configuration
- the related client/server sideConfiguration
. Can benull
.- Returns:
- corresponding
OutboundJaxrsResponse
instance.
-
from
Deprecated.Get an OutboundJaxrsResponse instance for a given JAX-RS response.- Parameters:
response
- response instance to from.- Returns:
- corresponding
OutboundJaxrsResponse
instance. - See Also:
-
getContext
Get the underlying outbound message context.- Returns:
- underlying outbound message context.
-
getStatus
public int getStatus() -
getStatusInfo
- Specified by:
getStatusInfo
in classResponse
-
getEntity
-
readEntity
- Specified by:
readEntity
in classResponse
- Throws:
ProcessingException
-
readEntity
- Specified by:
readEntity
in classResponse
- Throws:
ProcessingException
-
readEntity
- Specified by:
readEntity
in classResponse
- Throws:
ProcessingException
-
readEntity
public <T> T readEntity(GenericType<T> entityType, Annotation[] annotations) throws ProcessingException - Specified by:
readEntity
in classResponse
- Throws:
ProcessingException
-
hasEntity
public boolean hasEntity() -
bufferEntity
- Specified by:
bufferEntity
in classResponse
- Throws:
ProcessingException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classResponse
- Throws:
ProcessingException
-
getStringHeaders
- Specified by:
getStringHeaders
in classResponse
-
getHeaderString
- Specified by:
getHeaderString
in classResponse
-
getMediaType
- Specified by:
getMediaType
in classResponse
-
getLanguage
- Specified by:
getLanguage
in classResponse
-
getLength
public int getLength() -
getCookies
- Specified by:
getCookies
in classResponse
-
getEntityTag
- Specified by:
getEntityTag
in classResponse
-
getDate
-
getLastModified
- Specified by:
getLastModified
in classResponse
-
getAllowedMethods
- Specified by:
getAllowedMethods
in classResponse
-
getLocation
- Specified by:
getLocation
in classResponse
-
getLinks
-
hasLink
-
getLink
-
getLinkBuilder
- Specified by:
getLinkBuilder
in classResponse
-
getMetadata
- Specified by:
getMetadata
in classResponse
-
toString
-