public class OutboundJaxrsResponse
extends javax.ws.rs.core.Response
underlying
outbound message context
.Modifier and Type | Class and Description |
---|---|
static class |
OutboundJaxrsResponse.Builder
Outbound JAX-RS
Response.ResponseBuilder implementation. |
Constructor and Description |
---|
OutboundJaxrsResponse(javax.ws.rs.core.Response.StatusType status,
OutboundMessageContext context)
Create new outbound JAX-RS response message instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
bufferEntity() |
void |
close() |
static OutboundJaxrsResponse |
from(javax.ws.rs.core.Response response)
Deprecated.
|
static OutboundJaxrsResponse |
from(javax.ws.rs.core.Response response,
javax.ws.rs.core.Configuration configuration)
Get an OutboundJaxrsResponse instance for a given JAX-RS response.
|
Set<String> |
getAllowedMethods() |
OutboundMessageContext |
getContext()
Get the underlying outbound message context.
|
Map<String,javax.ws.rs.core.NewCookie> |
getCookies() |
Date |
getDate() |
Object |
getEntity() |
javax.ws.rs.core.EntityTag |
getEntityTag() |
String |
getHeaderString(String name) |
Locale |
getLanguage() |
Date |
getLastModified() |
int |
getLength() |
javax.ws.rs.core.Link |
getLink(String relation) |
javax.ws.rs.core.Link.Builder |
getLinkBuilder(String relation) |
Set<javax.ws.rs.core.Link> |
getLinks() |
URI |
getLocation() |
javax.ws.rs.core.MediaType |
getMediaType() |
javax.ws.rs.core.MultivaluedMap<String,Object> |
getMetadata() |
int |
getStatus() |
javax.ws.rs.core.Response.StatusType |
getStatusInfo() |
javax.ws.rs.core.MultivaluedMap<String,String> |
getStringHeaders() |
boolean |
hasEntity() |
boolean |
hasLink(String relation) |
<T> T |
readEntity(Class<T> type) |
<T> T |
readEntity(Class<T> type,
Annotation[] annotations) |
<T> T |
readEntity(javax.ws.rs.core.GenericType<T> entityType) |
<T> T |
readEntity(javax.ws.rs.core.GenericType<T> entityType,
Annotation[] annotations) |
String |
toString() |
public OutboundJaxrsResponse(javax.ws.rs.core.Response.StatusType status, OutboundMessageContext context)
status
- response status.context
- underlying outbound message context.public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response, javax.ws.rs.core.Configuration configuration)
response
- response instance to from.configuration
- the related client/server side Configuration
. Can be null
.OutboundJaxrsResponse
instance.@Deprecated public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response)
response
- response instance to from.OutboundJaxrsResponse
instance.from(Response, Configuration)
public OutboundMessageContext getContext()
public int getStatus()
getStatus
in class javax.ws.rs.core.Response
public javax.ws.rs.core.Response.StatusType getStatusInfo()
getStatusInfo
in class javax.ws.rs.core.Response
public Object getEntity()
getEntity
in class javax.ws.rs.core.Response
public <T> T readEntity(Class<T> type) throws javax.ws.rs.ProcessingException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
public <T> T readEntity(javax.ws.rs.core.GenericType<T> entityType) throws javax.ws.rs.ProcessingException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
public <T> T readEntity(Class<T> type, Annotation[] annotations) throws javax.ws.rs.ProcessingException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
public <T> T readEntity(javax.ws.rs.core.GenericType<T> entityType, Annotation[] annotations) throws javax.ws.rs.ProcessingException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
public boolean hasEntity()
hasEntity
in class javax.ws.rs.core.Response
public boolean bufferEntity() throws javax.ws.rs.ProcessingException
bufferEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
public void close() throws javax.ws.rs.ProcessingException
close
in interface AutoCloseable
close
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
public javax.ws.rs.core.MultivaluedMap<String,String> getStringHeaders()
getStringHeaders
in class javax.ws.rs.core.Response
public String getHeaderString(String name)
getHeaderString
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MediaType getMediaType()
getMediaType
in class javax.ws.rs.core.Response
public Locale getLanguage()
getLanguage
in class javax.ws.rs.core.Response
public int getLength()
getLength
in class javax.ws.rs.core.Response
public Map<String,javax.ws.rs.core.NewCookie> getCookies()
getCookies
in class javax.ws.rs.core.Response
public javax.ws.rs.core.EntityTag getEntityTag()
getEntityTag
in class javax.ws.rs.core.Response
public Date getDate()
getDate
in class javax.ws.rs.core.Response
public Date getLastModified()
getLastModified
in class javax.ws.rs.core.Response
public Set<String> getAllowedMethods()
getAllowedMethods
in class javax.ws.rs.core.Response
public URI getLocation()
getLocation
in class javax.ws.rs.core.Response
public Set<javax.ws.rs.core.Link> getLinks()
getLinks
in class javax.ws.rs.core.Response
public boolean hasLink(String relation)
hasLink
in class javax.ws.rs.core.Response
public javax.ws.rs.core.Link getLink(String relation)
getLink
in class javax.ws.rs.core.Response
public javax.ws.rs.core.Link.Builder getLinkBuilder(String relation)
getLinkBuilder
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MultivaluedMap<String,Object> getMetadata()
getMetadata
in class javax.ws.rs.core.Response
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.