org.jboss.resteasy.core
Class ServerResponse
java.lang.Object
javax.ws.rs.core.Response
org.jboss.resteasy.core.ServerResponse
public class ServerResponse
- extends javax.ws.rs.core.Response
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
Nested classes/interfaces inherited from class javax.ws.rs.core.Response |
javax.ws.rs.core.Response.ResponseBuilder, javax.ws.rs.core.Response.Status, javax.ws.rs.core.Response.StatusType |
Methods inherited from class javax.ws.rs.core.Response |
created, fromResponse, 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 |
entity
protected Object entity
status
protected int status
metadata
protected Headers<Object> metadata
annotations
protected Annotation[] annotations
genericType
protected Type genericType
postProcessInterceptors
protected PostProcessInterceptor[] postProcessInterceptors
messageBodyWriterInterceptors
protected MessageBodyWriterInterceptor[] messageBodyWriterInterceptors
resourceMethod
protected Method resourceMethod
resourceClass
protected Class resourceClass
headersCommitted
protected boolean headersCommitted
ServerResponse
public ServerResponse(Object entity,
int status,
Headers<Object> metadata)
ServerResponse
public ServerResponse()
copyIfNotServerResponse
public static ServerResponse copyIfNotServerResponse(javax.ws.rs.core.Response response)
getResourceMethod
public Method getResourceMethod()
- JAX-RS method invoked on. FYI, this method may return null, specifically within the context of an async HTTP
request as contextual
information is not available to the container.
- Returns:
setResourceMethod
public void setResourceMethod(Method resourceMethod)
getResourceClass
public Class getResourceClass()
- Resource class. FYI, this method may return null, specifically within the context of an async HTTP request as contextual
information is not available to the container
- Returns:
setResourceClass
public void setResourceClass(Class resourceClass)
getMessageBodyWriterInterceptors
public MessageBodyWriterInterceptor[] getMessageBodyWriterInterceptors()
setMessageBodyWriterInterceptors
public void setMessageBodyWriterInterceptors(MessageBodyWriterInterceptor[] messageBodyWriterInterceptors)
getPostProcessInterceptors
public PostProcessInterceptor[] getPostProcessInterceptors()
setPostProcessInterceptors
public void setPostProcessInterceptors(PostProcessInterceptor[] postProcessInterceptors)
getEntity
public Object getEntity()
- Specified by:
getEntity
in class javax.ws.rs.core.Response
getStatus
public int getStatus()
- Specified by:
getStatus
in class javax.ws.rs.core.Response
getMetadata
public javax.ws.rs.core.MultivaluedMap<String,Object> getMetadata()
- Specified by:
getMetadata
in class javax.ws.rs.core.Response
setEntity
public void setEntity(Object entity)
setStatus
public void setStatus(int status)
setMetadata
public void setMetadata(javax.ws.rs.core.MultivaluedMap<String,Object> metadata)
getAnnotations
public Annotation[] getAnnotations()
setAnnotations
public void setAnnotations(Annotation[] annotations)
getGenericType
public Type getGenericType()
setGenericType
public void setGenericType(Type genericType)
writeTo
public void writeTo(HttpRequest request,
HttpResponse response,
ResteasyProviderFactory providerFactory)
throws WriterException
- If there is an entity, headers are not converted to a string and set on the HttpResponse until the output stream is written to. If there is an exception
thrown then the headers are never written to the response. We do this so that on error conditions there is a clean response.
- Parameters:
request
- response
- providerFactory
-
- Throws:
WriterException
resolveContentType
public javax.ws.rs.core.MediaType resolveContentType()
commitHeaders
public void commitHeaders(HttpResponse response)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.