org.glassfish.jersey.message.internal
Class OutboundJaxrsResponse
java.lang.Object
javax.ws.rs.core.Response
org.glassfish.jersey.message.internal.OutboundJaxrsResponse
public class OutboundJaxrsResponse
- extends Response
An outbound JAX-RS response message.
The implementation delegates method calls to an underlying
outbound message context.
- Author:
- Marek Potociar (marek.potociar at oracle.com)
| Methods inherited from class javax.ws.rs.core.Response |
accepted, accepted, created, fromResponse, getHeaders, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, seeOther, serverError, status, status, status, temporaryRedirect |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
from
public static OutboundJaxrsResponse from(Response response)
- Get an OutboundJaxrsResponse instance for a given JAX-RS response.
- Parameters:
response - response instance to from.
- Returns:
- corresponding
OutboundJaxrsResponse instance.
getContext
public OutboundMessageContext getContext()
- Get the underlying outbound message context.
- Returns:
- underlying outbound message context.
getStatus
public int getStatus()
- Specified by:
getStatus in class Response
getStatusInfo
public Response.StatusType getStatusInfo()
- Specified by:
getStatusInfo in class Response
getEntity
public Object getEntity()
- Specified by:
getEntity in class Response
readEntity
public <T> T readEntity(Class<T> type)
throws ProcessingException
- Specified by:
readEntity in class Response
- Throws:
ProcessingException
readEntity
public <T> T readEntity(GenericType<T> entityType)
throws ProcessingException
- Specified by:
readEntity in class Response
- Throws:
ProcessingException
readEntity
public <T> T readEntity(Class<T> type,
Annotation[] annotations)
throws ProcessingException
- Specified by:
readEntity in class Response
- Throws:
ProcessingException
readEntity
public <T> T readEntity(GenericType<T> entityType,
Annotation[] annotations)
throws ProcessingException
- Specified by:
readEntity in class Response
- Throws:
ProcessingException
hasEntity
public boolean hasEntity()
- Specified by:
hasEntity in class Response
bufferEntity
public boolean bufferEntity()
throws ProcessingException
- Specified by:
bufferEntity in class Response
- Throws:
ProcessingException
close
public void close()
throws ProcessingException
- Specified by:
close in class Response
- Throws:
ProcessingException
getStringHeaders
public MultivaluedMap<String,String> getStringHeaders()
- Specified by:
getStringHeaders in class Response
getHeaderString
public String getHeaderString(String name)
- Specified by:
getHeaderString in class Response
getMediaType
public MediaType getMediaType()
- Specified by:
getMediaType in class Response
getLanguage
public Locale getLanguage()
- Specified by:
getLanguage in class Response
getLength
public int getLength()
- Specified by:
getLength in class Response
getCookies
public Map<String,NewCookie> getCookies()
- Specified by:
getCookies in class Response
getEntityTag
public EntityTag getEntityTag()
- Specified by:
getEntityTag in class Response
getDate
public Date getDate()
- Specified by:
getDate in class Response
getLastModified
public Date getLastModified()
- Specified by:
getLastModified in class Response
getAllowedMethods
public Set<String> getAllowedMethods()
- Specified by:
getAllowedMethods in class Response
getLocation
public URI getLocation()
- Specified by:
getLocation in class Response
getLinks
public Set<Link> getLinks()
- Specified by:
getLinks in class Response
hasLink
public boolean hasLink(String relation)
- Specified by:
hasLink in class Response
getLink
public Link getLink(String relation)
- Specified by:
getLink in class Response
getLinkBuilder
public Link.Builder getLinkBuilder(String relation)
- Specified by:
getLinkBuilder in class Response
getMetadata
public MultivaluedMap<String,Object> getMetadata()
- Specified by:
getMetadata in class Response
Copyright © 2007-2013 Oracle Corporation. All Rights Reserved. Use is subject to license terms.