public class ResponseContainerRequestContext extends PreMatchContainerRequestContext
httpRequest, response
Constructor and Description |
---|
ResponseContainerRequestContext(HttpRequest request) |
Modifier and Type | Method and Description |
---|---|
void |
abortWith(Response response)
Abort the filter chain with a response.
|
void |
setEntityStream(InputStream entityStream)
Set a new entity input stream.
|
void |
setMethod(String method)
Set the request method.
|
void |
setRequestUri(URI requestUri)
Set a new request URI using the current base URI of the application to
resolve the application-specific request URI part.
|
void |
setRequestUri(URI baseUri,
URI requestUri)
Set a new request URI using a new base URI to resolve the application-specific
request URI part.
|
void |
setSecurityContext(SecurityContext context)
Set a new injectable security context information for the current request.
|
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
public ResponseContainerRequestContext(HttpRequest request)
public void abortWith(Response response)
ContainerRequestContext
abortWith
in interface ContainerRequestContext
abortWith
in class PreMatchContainerRequestContext
response
- response to be sent back to the client.public void setSecurityContext(SecurityContext context)
ContainerRequestContext
SecurityContext.getUserPrincipal()
must return null
if the current request has not been authenticated.setSecurityContext
in interface ContainerRequestContext
setSecurityContext
in class PreMatchContainerRequestContext
context
- new injectable request security context information.public void setEntityStream(InputStream entityStream)
ContainerRequestContext
setEntityStream
in interface ContainerRequestContext
setEntityStream
in class PreMatchContainerRequestContext
entityStream
- new entity input stream.public void setMethod(String method)
ContainerRequestContext
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 IllegalStateException
being thrown.
setMethod
in interface ContainerRequestContext
setMethod
in class PreMatchContainerRequestContext
method
- new request method.HttpMethod
public void setRequestUri(URI baseUri, URI requestUri) throws IllegalStateException
ContainerRequestContext
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 IllegalStateException
being thrown.
setRequestUri
in interface ContainerRequestContext
setRequestUri
in class PreMatchContainerRequestContext
baseUri
- base URI that will be used to resolve the application-specific
part of the request URI.requestUri
- new URI of the request.IllegalStateException
- in case the method is not invoked from a pre-matching
request filter.ContainerRequestContext.setRequestUri(java.net.URI)
public void setRequestUri(URI requestUri) throws IllegalStateException
ContainerRequestContext
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 IllegalStateException
being thrown.
setRequestUri
in interface ContainerRequestContext
setRequestUri
in class PreMatchContainerRequestContext
requestUri
- new URI of the request.IllegalStateException
- in case the method is not invoked from a pre-matching
request filter.ContainerRequestContext.setRequestUri(java.net.URI, java.net.URI)
Copyright © 2020 JBoss by Red Hat. All rights reserved.