Package org.apache.cxf.jaxrs.impl
Class ResponseImpl
- java.lang.Object
-
- javax.ws.rs.core.Response
-
- org.apache.cxf.jaxrs.impl.ResponseImpl
-
- All Implemented Interfaces:
AutoCloseable
public final class ResponseImpl extends javax.ws.rs.core.Response
-
-
Field Summary
Fields Modifier and Type Field Description static String
RESPONSE_STREAM_AUTO_CLOSE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
org.apache.cxf.message.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(org.apache.cxf.message.Message message)
void
setStatus(int statusCode)
void
setStatus(int statusCode, String reasonPhrase)
String
toString()
-
-
-
Field Detail
-
RESPONSE_STREAM_AUTO_CLOSE
public static final String RESPONSE_STREAM_AUTO_CLOSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setStatus
public void setStatus(int statusCode)
-
setStatus
public void setStatus(int statusCode, String reasonPhrase)
-
setEntity
public void setEntity(Object e, Annotation[] anns)
-
setEntityAnnotations
public void setEntityAnnotations(Annotation[] anns)
-
getEntityAnnotations
public Annotation[] getEntityAnnotations()
-
setOutMessage
public void setOutMessage(org.apache.cxf.message.Message message)
-
getOutMessage
public org.apache.cxf.message.Message getOutMessage()
-
getStatus
public int getStatus()
- Specified by:
getStatus
in classjavax.ws.rs.core.Response
-
getStatusInfo
public javax.ws.rs.core.Response.StatusType getStatusInfo()
- Specified by:
getStatusInfo
in classjavax.ws.rs.core.Response
-
getActualEntity
public Object getActualEntity()
-
getEntity
public Object getEntity()
- Specified by:
getEntity
in classjavax.ws.rs.core.Response
-
hasEntity
public boolean hasEntity()
- Specified by:
hasEntity
in classjavax.ws.rs.core.Response
-
getMetadata
public javax.ws.rs.core.MultivaluedMap<String,Object> getMetadata()
- Specified by:
getMetadata
in classjavax.ws.rs.core.Response
-
getHeaders
public javax.ws.rs.core.MultivaluedMap<String,Object> getHeaders()
- Overrides:
getHeaders
in classjavax.ws.rs.core.Response
-
getStringHeaders
public javax.ws.rs.core.MultivaluedMap<String,String> getStringHeaders()
- Specified by:
getStringHeaders
in classjavax.ws.rs.core.Response
-
getHeaderString
public String getHeaderString(String header)
- Specified by:
getHeaderString
in classjavax.ws.rs.core.Response
-
getAllowedMethods
public Set<String> getAllowedMethods()
- Specified by:
getAllowedMethods
in classjavax.ws.rs.core.Response
-
getCookies
public Map<String,javax.ws.rs.core.NewCookie> getCookies()
- Specified by:
getCookies
in classjavax.ws.rs.core.Response
-
getDate
public Date getDate()
- Specified by:
getDate
in classjavax.ws.rs.core.Response
-
getEntityTag
public javax.ws.rs.core.EntityTag getEntityTag()
- Specified by:
getEntityTag
in classjavax.ws.rs.core.Response
-
getLanguage
public Locale getLanguage()
- Specified by:
getLanguage
in classjavax.ws.rs.core.Response
-
getLastModified
public Date getLastModified()
- Specified by:
getLastModified
in classjavax.ws.rs.core.Response
-
getLength
public int getLength()
- Specified by:
getLength
in classjavax.ws.rs.core.Response
-
getLocation
public URI getLocation()
- Specified by:
getLocation
in classjavax.ws.rs.core.Response
-
getMediaType
public javax.ws.rs.core.MediaType getMediaType()
- Specified by:
getMediaType
in classjavax.ws.rs.core.Response
-
hasLink
public boolean hasLink(String relation)
- Specified by:
hasLink
in classjavax.ws.rs.core.Response
-
getLink
public javax.ws.rs.core.Link getLink(String relation)
- Specified by:
getLink
in classjavax.ws.rs.core.Response
-
getLinkBuilder
public javax.ws.rs.core.Link.Builder getLinkBuilder(String relation)
- Specified by:
getLinkBuilder
in classjavax.ws.rs.core.Response
-
getLinks
public Set<javax.ws.rs.core.Link> getLinks()
- Specified by:
getLinks
in classjavax.ws.rs.core.Response
-
readEntity
public <T> T readEntity(Class<T> cls) throws javax.ws.rs.ProcessingException, IllegalStateException
- Specified by:
readEntity
in classjavax.ws.rs.core.Response
- Throws:
javax.ws.rs.ProcessingException
IllegalStateException
-
readEntity
public <T> T readEntity(javax.ws.rs.core.GenericType<T> genType) throws javax.ws.rs.ProcessingException, IllegalStateException
- Specified by:
readEntity
in classjavax.ws.rs.core.Response
- Throws:
javax.ws.rs.ProcessingException
IllegalStateException
-
readEntity
public <T> T readEntity(Class<T> cls, Annotation[] anns) throws javax.ws.rs.ProcessingException, IllegalStateException
- Specified by:
readEntity
in classjavax.ws.rs.core.Response
- Throws:
javax.ws.rs.ProcessingException
IllegalStateException
-
readEntity
public <T> T readEntity(javax.ws.rs.core.GenericType<T> genType, Annotation[] anns) throws javax.ws.rs.ProcessingException, IllegalStateException
- Specified by:
readEntity
in classjavax.ws.rs.core.Response
- Throws:
javax.ws.rs.ProcessingException
IllegalStateException
-
doReadEntity
public <T> T doReadEntity(Class<T> cls, Type t, Annotation[] anns) throws javax.ws.rs.ProcessingException, IllegalStateException
- Throws:
javax.ws.rs.ProcessingException
IllegalStateException
-
convertEntityToStreamIfPossible
public InputStream convertEntityToStreamIfPossible()
-
autoClose
protected void autoClose(Class<?> cls, boolean exception)
-
autoCloseWithHint
protected void autoCloseWithHint(Class<?> cls, boolean autoCloseHint, boolean exception)
-
bufferEntity
public boolean bufferEntity() throws javax.ws.rs.ProcessingException
- Specified by:
bufferEntity
in classjavax.ws.rs.core.Response
- Throws:
javax.ws.rs.ProcessingException
-
close
public void close() throws javax.ws.rs.ProcessingException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classjavax.ws.rs.core.Response
- Throws:
javax.ws.rs.ProcessingException
-
-