public final class ResponseImpl
extends javax.ws.rs.core.Response
Modifier and Type | Field and Description |
---|---|
static String |
RESPONSE_STREAM_AUTO_CLOSE |
Modifier and Type | Method and Description |
---|---|
void |
addMetadata(javax.ws.rs.core.MultivaluedMap<String,Object> meta) |
protected void |
autoClose(Class<?> cls,
boolean exception) |
protected void |
autoCloseWithHint(Class<?> cls,
boolean autoCloseHint,
boolean exception) |
boolean |
bufferEntity() |
void |
close() |
InputStream |
convertEntityToStreamIfPossible() |
<T> T |
doReadEntity(Class<T> cls,
Type t,
Annotation[] anns) |
Object |
getActualEntity() |
Set<String> |
getAllowedMethods() |
Map<String,javax.ws.rs.core.NewCookie> |
getCookies() |
Date |
getDate() |
Object |
getEntity() |
Annotation[] |
getEntityAnnotations() |
javax.ws.rs.core.EntityTag |
getEntityTag() |
javax.ws.rs.core.MultivaluedMap<String,Object> |
getHeaders() |
String |
getHeaderString(String header) |
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() |
Message |
getOutMessage() |
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> cls) |
<T> T |
readEntity(Class<T> cls,
Annotation[] anns) |
<T> T |
readEntity(javax.ws.rs.core.GenericType<T> genType) |
<T> T |
readEntity(javax.ws.rs.core.GenericType<T> genType,
Annotation[] anns) |
void |
setEntity(Object e,
Annotation[] anns) |
void |
setEntityAnnotations(Annotation[] anns) |
void |
setOutMessage(Message message) |
void |
setStatus(int statusCode) |
void |
setStatus(int statusCode,
String reasonPhrase) |
public static final String RESPONSE_STREAM_AUTO_CLOSE
public void setStatus(int statusCode)
public void setStatus(int statusCode, String reasonPhrase)
public void setEntity(Object e, Annotation[] anns)
public void setEntityAnnotations(Annotation[] anns)
public Annotation[] getEntityAnnotations()
public void setOutMessage(Message message)
public Message getOutMessage()
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 getActualEntity()
public Object getEntity()
getEntity
in class javax.ws.rs.core.Response
public boolean hasEntity()
hasEntity
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MultivaluedMap<String,Object> getMetadata()
getMetadata
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MultivaluedMap<String,Object> getHeaders()
getHeaders
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MultivaluedMap<String,String> getStringHeaders()
getStringHeaders
in class javax.ws.rs.core.Response
public String getHeaderString(String header)
getHeaderString
in class javax.ws.rs.core.Response
public Set<String> getAllowedMethods()
getAllowedMethods
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 Date getDate()
getDate
in class javax.ws.rs.core.Response
public javax.ws.rs.core.EntityTag getEntityTag()
getEntityTag
in class javax.ws.rs.core.Response
public Locale getLanguage()
getLanguage
in class javax.ws.rs.core.Response
public Date getLastModified()
getLastModified
in class javax.ws.rs.core.Response
public int getLength()
getLength
in class javax.ws.rs.core.Response
public URI getLocation()
getLocation
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MediaType getMediaType()
getMediaType
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 Set<javax.ws.rs.core.Link> getLinks()
getLinks
in class javax.ws.rs.core.Response
public <T> T readEntity(Class<T> cls) throws javax.ws.rs.ProcessingException, IllegalStateException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
IllegalStateException
public <T> T readEntity(javax.ws.rs.core.GenericType<T> genType) throws javax.ws.rs.ProcessingException, IllegalStateException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
IllegalStateException
public <T> T readEntity(Class<T> cls, Annotation[] anns) throws javax.ws.rs.ProcessingException, IllegalStateException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
IllegalStateException
public <T> T readEntity(javax.ws.rs.core.GenericType<T> genType, Annotation[] anns) throws javax.ws.rs.ProcessingException, IllegalStateException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
IllegalStateException
public <T> T doReadEntity(Class<T> cls, Type t, Annotation[] anns) throws javax.ws.rs.ProcessingException, IllegalStateException
javax.ws.rs.ProcessingException
IllegalStateException
public InputStream convertEntityToStreamIfPossible()
protected void autoClose(Class<?> cls, boolean exception)
protected void autoCloseWithHint(Class<?> cls, boolean autoCloseHint, boolean exception)
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
Apache CXF