Class ContainerResponse
java.lang.Object
org.exoplatform.services.rest.impl.ContainerResponse
- All Implemented Interfaces:
GenericContainerResponse
- Version:
- $Id: $
- Author:
- Andrey Parfonov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.MediaTypejavax.ws.rs.core.ResponseGet presetResponse.intvoidsetResponse(javax.ws.rs.core.Response response) Set response.voidWrite response to output stream.
-
Constructor Details
-
ContainerResponse
- Parameters:
responseWriter- SeeContainerResponseWriter
-
-
Method Details
-
setResponse
public void setResponse(javax.ws.rs.core.Response response) Set response. New response can be override old one.- Specified by:
setResponsein interfaceGenericContainerResponse- Parameters:
response- SeeResponse
-
getResponse
public javax.ws.rs.core.Response getResponse()Get presetResponse. This method can be useful for modificationGenericContainerResponse. SeeResponseFilter.doFilter(GenericContainerResponse).- Specified by:
getResponsein interfaceGenericContainerResponse- Returns:
- preset
Responseor null if it was not initialized yet.
-
writeResponse
Write response to output stream.- Specified by:
writeResponsein interfaceGenericContainerResponse- Throws:
IOException- if any i/o errors occurs
-
getContentType
public javax.ws.rs.core.MediaType getContentType()- Specified by:
getContentTypein interfaceGenericContainerResponse- Returns:
- body content type
-
getEntityType
- Specified by:
getEntityTypein interfaceGenericContainerResponse- Returns:
- entity type
-
getEntity
- Specified by:
getEntityin interfaceGenericContainerResponse- Returns:
- entity body
-
getHttpHeaders
- Specified by:
getHttpHeadersin interfaceGenericContainerResponse- Returns:
- HTTP headers
-
getStatus
public int getStatus()- Specified by:
getStatusin interfaceGenericContainerResponse- Returns:
- HTTP status
-