Class OutboundJaxrsResponse
- java.lang.Object
-
- jakarta.ws.rs.core.Response
-
- org.glassfish.jersey.message.internal.OutboundJaxrsResponse
-
- All Implemented Interfaces:
AutoCloseable
public class OutboundJaxrsResponse extends Response
An outbound JAX-RS response message. The implementation delegates method calls to anunderlying outbound message context.- Author:
- Marek Potociar
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOutboundJaxrsResponse.BuilderOutbound JAX-RSResponse.ResponseBuilderimplementation.-
Nested classes/interfaces inherited from class jakarta.ws.rs.core.Response
Response.ResponseBuilder, Response.Status, Response.StatusType
-
-
Constructor Summary
Constructors Constructor Description OutboundJaxrsResponse(Response.StatusType status, OutboundMessageContext context)Create new outbound JAX-RS response message instance.
-
Method Summary
-
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 Detail
-
OutboundJaxrsResponse
public OutboundJaxrsResponse(Response.StatusType status, OutboundMessageContext context)
Create new outbound JAX-RS response message instance.- Parameters:
status- response status.context- underlying outbound message context.
-
-
Method Detail
-
from
public static OutboundJaxrsResponse from(Response response, Configuration configuration)
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
OutboundJaxrsResponseinstance.
-
from
@Deprecated public static OutboundJaxrsResponse from(Response response)
Deprecated.Get an OutboundJaxrsResponse instance for a given JAX-RS response.- Parameters:
response- response instance to from.- Returns:
- corresponding
OutboundJaxrsResponseinstance. - See Also:
from(Response, Configuration)
-
getContext
public OutboundMessageContext getContext()
Get the underlying outbound message context.- Returns:
- underlying outbound message context.
-
getStatusInfo
public Response.StatusType getStatusInfo()
- Specified by:
getStatusInfoin classResponse
-
readEntity
public <T> T readEntity(Class<T> type) throws ProcessingException
- Specified by:
readEntityin classResponse- Throws:
ProcessingException
-
readEntity
public <T> T readEntity(GenericType<T> entityType) throws ProcessingException
- Specified by:
readEntityin classResponse- Throws:
ProcessingException
-
readEntity
public <T> T readEntity(Class<T> type, Annotation[] annotations) throws ProcessingException
- Specified by:
readEntityin classResponse- Throws:
ProcessingException
-
readEntity
public <T> T readEntity(GenericType<T> entityType, Annotation[] annotations) throws ProcessingException
- Specified by:
readEntityin classResponse- Throws:
ProcessingException
-
bufferEntity
public boolean bufferEntity() throws ProcessingException- Specified by:
bufferEntityin classResponse- Throws:
ProcessingException
-
close
public void close() throws ProcessingException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classResponse- Throws:
ProcessingException
-
getStringHeaders
public MultivaluedMap<String,String> getStringHeaders()
- Specified by:
getStringHeadersin classResponse
-
getHeaderString
public String getHeaderString(String name)
- Specified by:
getHeaderStringin classResponse
-
getMediaType
public MediaType getMediaType()
- Specified by:
getMediaTypein classResponse
-
getLanguage
public Locale getLanguage()
- Specified by:
getLanguagein classResponse
-
getCookies
public Map<String,NewCookie> getCookies()
- Specified by:
getCookiesin classResponse
-
getEntityTag
public EntityTag getEntityTag()
- Specified by:
getEntityTagin classResponse
-
getLastModified
public Date getLastModified()
- Specified by:
getLastModifiedin classResponse
-
getAllowedMethods
public Set<String> getAllowedMethods()
- Specified by:
getAllowedMethodsin classResponse
-
getLocation
public URI getLocation()
- Specified by:
getLocationin classResponse
-
getLinkBuilder
public Link.Builder getLinkBuilder(String relation)
- Specified by:
getLinkBuilderin classResponse
-
getMetadata
public MultivaluedMap<String,Object> getMetadata()
- Specified by:
getMetadatain classResponse
-
-