Class ContainerResponseContextImpl
- java.lang.Object
-
- org.jboss.resteasy.core.interception.jaxrs.ContainerResponseContextImpl
-
- All Implemented Interfaces:
jakarta.ws.rs.container.ContainerResponseContext,SuspendableContainerResponseContext
public class ContainerResponseContextImpl extends Object implements SuspendableContainerResponseContext
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected HttpResponsehttpResponseprotected BuiltResponsejaxrsResponseprotected HttpRequestrequest
-
Constructor Summary
Constructors Constructor Description ContainerResponseContextImpl(HttpRequest request, HttpResponse httpResponse, BuiltResponse serverResponse)Deprecated.ContainerResponseContextImpl(HttpRequest request, HttpResponse httpResponse, BuiltResponse serverResponse, ResponseContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseFilter[] responseFilters, Consumer<Throwable> onComplete, ServerResponseWriter.RunnableWithIOException continuation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilter()Set<String>getAllowedMethods()Map<String,jakarta.ws.rs.core.NewCookie>getCookies()DategetDate()ObjectgetEntity()Annotation[]getEntityAnnotations()Class<?>getEntityClass()OutputStreamgetEntityStream()jakarta.ws.rs.core.EntityTaggetEntityTag()TypegetEntityType()jakarta.ws.rs.core.MultivaluedMap<String,Object>getHeaders()StringgetHeaderString(String name)HttpResponsegetHttpResponse()BuiltResponsegetJaxrsResponse()LocalegetLanguage()DategetLastModified()intgetLength()jakarta.ws.rs.core.LinkgetLink(String relation)jakarta.ws.rs.core.Link.BuildergetLinkBuilder(String relation)Set<jakarta.ws.rs.core.Link>getLinks()URIgetLocation()jakarta.ws.rs.core.MediaTypegetMediaType()intgetStatus()jakarta.ws.rs.core.Response.StatusTypegetStatusInfo()jakarta.ws.rs.core.MultivaluedMap<String,String>getStringHeaders()booleanhasEntity()booleanhasLink(String relation)voidresume()Resumes the current response, and proceeds to the next response filter, if any, or to send the response.voidresume(Throwable t)Aborts the current response with the given exception.voidsetEntity(Object entity)voidsetEntity(Object entity, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)voidsetEntityStream(OutputStream entityStream)voidsetStatus(int code)voidsetStatusInfo(jakarta.ws.rs.core.Response.StatusType statusInfo)voidsuspend()Suspends the current response.
-
-
-
Field Detail
-
request
protected final HttpRequest request
-
httpResponse
protected final HttpResponse httpResponse
-
jaxrsResponse
protected final BuiltResponse jaxrsResponse
-
-
Constructor Detail
-
ContainerResponseContextImpl
@Deprecated public ContainerResponseContextImpl(HttpRequest request, HttpResponse httpResponse, BuiltResponse serverResponse)
Deprecated.
-
ContainerResponseContextImpl
public ContainerResponseContextImpl(HttpRequest request, HttpResponse httpResponse, BuiltResponse serverResponse, ResponseContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseFilter[] responseFilters, Consumer<Throwable> onComplete, ServerResponseWriter.RunnableWithIOException continuation)
-
-
Method Detail
-
getJaxrsResponse
public BuiltResponse getJaxrsResponse()
-
getHttpResponse
public HttpResponse getHttpResponse()
-
getStatus
public int getStatus()
- Specified by:
getStatusin interfacejakarta.ws.rs.container.ContainerResponseContext
-
setStatus
public void setStatus(int code)
- Specified by:
setStatusin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getStatusInfo
public jakarta.ws.rs.core.Response.StatusType getStatusInfo()
- Specified by:
getStatusInfoin interfacejakarta.ws.rs.container.ContainerResponseContext
-
setStatusInfo
public void setStatusInfo(jakarta.ws.rs.core.Response.StatusType statusInfo)
- Specified by:
setStatusInfoin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityClass
public Class<?> getEntityClass()
- Specified by:
getEntityClassin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityType
public Type getEntityType()
- Specified by:
getEntityTypein interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntity
public void setEntity(Object entity)
- Specified by:
setEntityin interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntity
public void setEntity(Object entity, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
- Specified by:
setEntityin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getHeaders
public jakarta.ws.rs.core.MultivaluedMap<String,Object> getHeaders()
- Specified by:
getHeadersin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getAllowedMethods
public Set<String> getAllowedMethods()
- Specified by:
getAllowedMethodsin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getDate
public Date getDate()
- Specified by:
getDatein interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLanguage
public Locale getLanguage()
- Specified by:
getLanguagein interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLength
public int getLength()
- Specified by:
getLengthin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getMediaType
public jakarta.ws.rs.core.MediaType getMediaType()
- Specified by:
getMediaTypein interfacejakarta.ws.rs.container.ContainerResponseContext
-
getCookies
public Map<String,jakarta.ws.rs.core.NewCookie> getCookies()
- Specified by:
getCookiesin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityTag
public jakarta.ws.rs.core.EntityTag getEntityTag()
- Specified by:
getEntityTagin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLastModified
public Date getLastModified()
- Specified by:
getLastModifiedin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLocation
public URI getLocation()
- Specified by:
getLocationin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLinks
public Set<jakarta.ws.rs.core.Link> getLinks()
- Specified by:
getLinksin interfacejakarta.ws.rs.container.ContainerResponseContext
-
hasLink
public boolean hasLink(String relation)
- Specified by:
hasLinkin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLink
public jakarta.ws.rs.core.Link getLink(String relation)
- Specified by:
getLinkin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLinkBuilder
public jakarta.ws.rs.core.Link.Builder getLinkBuilder(String relation)
- Specified by:
getLinkBuilderin interfacejakarta.ws.rs.container.ContainerResponseContext
-
hasEntity
public boolean hasEntity()
- Specified by:
hasEntityin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntity
public Object getEntity()
- Specified by:
getEntityin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityStream
public OutputStream getEntityStream()
- Specified by:
getEntityStreamin interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntityStream
public void setEntityStream(OutputStream entityStream)
- Specified by:
setEntityStreamin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityAnnotations
public Annotation[] getEntityAnnotations()
- Specified by:
getEntityAnnotationsin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getStringHeaders
public jakarta.ws.rs.core.MultivaluedMap<String,String> getStringHeaders()
- Specified by:
getStringHeadersin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getHeaderString
public String getHeaderString(String name)
- Specified by:
getHeaderStringin interfacejakarta.ws.rs.container.ContainerResponseContext
-
suspend
public void suspend()
Description copied from interface:SuspendableContainerResponseContextSuspends the current response. This makes the current request asynchronous. No further response filter is executed until this response is resumed. No reply is going to be sent to the client until this response is resumed either withSuspendableContainerResponseContext.resume()or aborted withSuspendableContainerResponseContext.resume(Throwable)orResponseContainerRequestContext.abortWith(jakarta.ws.rs.core.Response).- Specified by:
suspendin interfaceSuspendableContainerResponseContext
-
resume
public void resume()
Description copied from interface:SuspendableContainerResponseContextResumes the current response, and proceeds to the next response filter, if any, or to send the response.- Specified by:
resumein interfaceSuspendableContainerResponseContext
-
resume
public void resume(Throwable t)
Description copied from interface:SuspendableContainerResponseContextAborts the current response with the given exception. This behaves as if the request filter threw this exception synchronously, which means that the exception will not be mapped by exception mappers, the response filters will stop running, and the async response callbacks will be called with this exception.- Specified by:
resumein interfaceSuspendableContainerResponseContext- Parameters:
t- the exception to send back to the client, as an internal server error.
-
filter
public void filter() throws IOException- Throws:
IOException
-
-