Class ResponseContainerRequestContext
- java.lang.Object
-
- org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext
-
- org.jboss.resteasy.core.interception.jaxrs.ResponseContainerRequestContext
-
- All Implemented Interfaces:
ContainerRequestContext,SuspendableContainerRequestContext
public class ResponseContainerRequestContext extends PreMatchContainerRequestContext
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
-
Fields inherited from class org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext
httpRequest, response
-
-
Constructor Summary
Constructors Constructor Description ResponseContainerRequestContext(HttpRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortWith(Response response)Abort the filter chain with a response.voidsetEntityStream(InputStream entityStream)Set a new entity input stream.voidsetMethod(String method)Set the request method.voidsetRequestUri(URI requestUri)Set a new request URI using the current base URI of the application to resolve the application-specific request URI part.voidsetRequestUri(URI baseUri, URI requestUri)Set a new request URI using a new base URI to resolve the application-specific request URI part.voidsetSecurityContext(SecurityContext context)Set a new injectable security context information for the current request.-
Methods inherited from class org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext
filter, getAcceptableLanguages, getAcceptableMediaTypes, getCookies, getDate, getEntityStream, getHeaders, getHeaderString, getHttpRequest, getLanguage, getLength, getMediaType, getMethod, getProperty, getPropertyNames, getRequest, getResponseAbortedWith, getSecurityContext, getUriInfo, hasEntity, removeProperty, resume, resume, setProperty, startedContinuation, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.ws.rs.container.ContainerRequestContext
hasProperty
-
-
-
-
Constructor Detail
-
ResponseContainerRequestContext
public ResponseContainerRequestContext(HttpRequest request)
-
-
Method Detail
-
abortWith
public void abortWith(Response response)
Description copied from interface:ContainerRequestContextAbort the filter chain with a response. This method breaks the filter chain processing and returns the provided response back to the client. The provided response goes through the chain of applicable response filters.- Specified by:
abortWithin interfaceContainerRequestContext- Overrides:
abortWithin classPreMatchContainerRequestContext- Parameters:
response- response to be sent back to the client.
-
setSecurityContext
public void setSecurityContext(SecurityContext context)
Description copied from interface:ContainerRequestContextSet a new injectable security context information for the current request. TheSecurityContext.getUserPrincipal()must returnnullif the current request has not been authenticated.- Specified by:
setSecurityContextin interfaceContainerRequestContext- Overrides:
setSecurityContextin classPreMatchContainerRequestContext- Parameters:
context- new injectable request security context information.
-
setEntityStream
public void setEntityStream(InputStream entityStream)
Description copied from interface:ContainerRequestContextSet a new entity input stream. The JAX-RS runtime is responsible for closing the input stream.- Specified by:
setEntityStreamin interfaceContainerRequestContext- Overrides:
setEntityStreamin classPreMatchContainerRequestContext- Parameters:
entityStream- new entity input stream.
-
setMethod
public void setMethod(String method)
Description copied from interface:ContainerRequestContextSet the request method.Note that the method is usable only in pre-matching filters, prior to the resource matching occurs. Trying to invoke the method in a filter bound to a resource method results in an
IllegalStateExceptionbeing thrown.- Specified by:
setMethodin interfaceContainerRequestContext- Overrides:
setMethodin classPreMatchContainerRequestContext- Parameters:
method- new request method.- See Also:
HttpMethod
-
setRequestUri
public void setRequestUri(URI baseUri, URI requestUri) throws IllegalStateException
Description copied from interface:ContainerRequestContextSet a new request URI using a new base URI to resolve the application-specific request URI part.Note that the method is usable only in pre-matching filters, prior to the resource matching occurs. Trying to invoke the method in a filter bound to a resource method results in an
IllegalStateExceptionbeing thrown.- Specified by:
setRequestUriin interfaceContainerRequestContext- Overrides:
setRequestUriin classPreMatchContainerRequestContext- Parameters:
baseUri- base URI that will be used to resolve the application-specific part of the request URI.requestUri- new URI of the request.- Throws:
IllegalStateException- in case the method is not invoked from apre-matchingrequest filter.- See Also:
ContainerRequestContext.setRequestUri(java.net.URI)
-
setRequestUri
public void setRequestUri(URI requestUri) throws IllegalStateException
Description copied from interface:ContainerRequestContextSet a new request URI using the current base URI of the application to resolve the application-specific request URI part.Note that the method is usable only in pre-matching filters, prior to the resource matching occurs. Trying to invoke the method in a filter bound to a resource method results in an
IllegalStateExceptionbeing thrown.- Specified by:
setRequestUriin interfaceContainerRequestContext- Overrides:
setRequestUriin classPreMatchContainerRequestContext- Parameters:
requestUri- new URI of the request.- Throws:
IllegalStateException- in case the method is not invoked from apre-matchingrequest filter.- See Also:
ContainerRequestContext.setRequestUri(java.net.URI, java.net.URI)
-
-