Class ResteasyReactiveRequestContext
java.lang.Object
org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
- All Implemented Interfaces:
Closeable,AutoCloseable,Runnable,ResteasyReactiveCallbackContext,ResteasyReactiveInjectionContext,ServerRequestContext
public abstract class ResteasyReactiveRequestContext
extends AbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
implements Closeable, ResteasyReactiveInjectionContext, ServerRequestContext
-
Field Summary
FieldsFields inherited from class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext
abortHandlerChain, CUSTOM_RR_PROPERTIES_PREFIX, handlers, log, logWebApplicationExceptions, position, throwable -
Constructor Summary
ConstructorsConstructorDescriptionResteasyReactiveRequestContext(Deployment deployment, ThreadSetupAction requestContext, ServerRestHandler[] handlerChain, ServerRestHandler[] abortHandlerChain) -
Method Summary
Modifier and TypeMethodDescriptionvoidabortWith(jakarta.ws.rs.core.Response response) Meant to be used when an error occurred early in processing chainvoidclose()protected jakarta.ws.rs.core.SecurityContextprotected voidgetCookieParameter(String name) protected abstract ExecutorgetFormParameter(String name, boolean single, boolean encoded) getMatrixParameter(String name, boolean single, boolean encoded) Object[]getPath()Returns the normalised non-decoded path including any prefix.getPathParam(int index, boolean encoded) getPathParameter(String name, boolean encoded) List<jakarta.ws.rs.core.PathSegment>Return the path segmentsReturns the normalised non-decoded path excluding any prefix.getQueryParameter(String name, boolean single, boolean encoded) getQueryParameter(String name, boolean single, boolean encoded, String separator) jakarta.ws.rs.ext.ReaderInterceptor[]jakarta.ws.rs.core.Requestjakarta.ws.rs.core.HttpHeadersgetResourceLocatorPathParam(String name, boolean encoded) Returns the current response content type.jakarta.ws.rs.core.MediaTypejakarta.ws.rs.core.SecurityContextjakarta.ws.rs.core.UriInfojakarta.ws.rs.ext.WriterInterceptor[]protected voidbooleanvoidhandleUnmappedException(Throwable throwable) protected voidhandleUnrecoverableError(Throwable throwable) booleanbooleanvoidinitializes the path segments and removes any matrix params for the path used for matching.booleanbooleanvoidabstract RunnableregisterTimer(long millis, Runnable task) protected voidvoidResets the build time serialization assumptions.voidrestart(RuntimeResource target) Restarts handler chain processing with a new chain targeting a new resource.voidrestart(RuntimeResource target, boolean setLocatorTarget) protected voidrestarted(boolean keepTarget) abstract booleanvoidprotected voidsecurityContextUpdated(jakarta.ws.rs.core.SecurityContext securityContext) abstract ServerHttpRequestabstract ServerHttpResponsevoidsetAdditionalAnnotations(Annotation[] additionalAnnotations) voidsetAllAnnotations(Annotation[] annotations) setAsyncResponse(AsyncResponseImpl asyncResponse) setEndpointInstance(Object endpointInstance) setEntityWriter(EntityWriter entityWriter) setFormData(FormData formData) setGenericReturnType(Type genericReturnType) setInputStream(InputStream inputStream) voidsetMaxPathParams(int maxPathParams) voidsetMethodAnnotations(Annotation[] methodAnnotations) voidsetOutputStream(OutputStream outputStream) setPathParamValue(int index, String value) voidsetProducesChecked(boolean checked) protected voidsetQueryParamsFrom(String uri) setReaderInterceptors(jakarta.ws.rs.ext.ReaderInterceptor[] readerInterceptors) voidsetRemaining(String remaining) setRequestEntity(Object requestEntity) setRequestUri(URI requestURI) setResponse(LazyResponse response) setResponseContentType(jakarta.ws.rs.core.MediaType responseContentType) setResponseContentType(EncodedMediaType responseContentType) setSecurityContext(jakarta.ws.rs.core.SecurityContext securityContext) voidsetSseEventSink(SseEventSinkImpl sseEventSink) voidsetUriInfo(jakarta.ws.rs.core.UriInfo uriInfo) setWriterInterceptors(jakarta.ws.rs.ext.WriterInterceptor[] writerInterceptors) <T> TMethods inherited from class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext
beginAsyncProcessing, captureCDIRequestScope, getAbortHandlerChain, getContextExecutor, getHandlers, getPosition, getProperty, getPropertyNames, handleException, handleException, invokeHandler, isRequestScopeManagementRequired, isSuspended, registerCompletionCallback, registerConnectionCallback, removeProperty, requireCDIRequestScope, restart, restart, resume, resume, resume, resume, run, setAbortHandlerChain, setAbortHandlerChainStarted, setPosition, setProperty, setSuspended, suspend, unwrapExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.resteasy.reactive.common.core.ResteasyReactiveCallbackContext
registerCompletionCallback, registerConnectionCallback
-
Field Details
-
EMPTY_ARRAY
-
deployment
-
-
Constructor Details
-
ResteasyReactiveRequestContext
public ResteasyReactiveRequestContext(Deployment deployment, ThreadSetupAction requestContext, ServerRestHandler[] handlerChain, ServerRestHandler[] abortHandlerChain)
-
-
Method Details
-
serverRequest
-
serverResponse
- Specified by:
serverResponsein interfaceServerRequestContext
-
getRequestHeaders
public jakarta.ws.rs.core.HttpHeaders getRequestHeaders()- Specified by:
getRequestHeadersin interfaceServerRequestContext
-
getDeployment
-
getProviders
-
restart
Restarts handler chain processing with a new chain targeting a new resource.- Parameters:
target- The resource target
-
restart
-
abortWith
public void abortWith(jakarta.ws.rs.core.Response response) Meant to be used when an error occurred early in processing chain- Specified by:
abortWithin interfaceServerRequestContext
-
resetBuildTimeSerialization
public void resetBuildTimeSerialization()Resets the build time serialization assumptions. Called if a filter modifies the response -
getUriInfo
public jakarta.ws.rs.core.UriInfo getUriInfo() -
getHttpHeaders
-
getParameters
-
setMaxPathParams
public void setMaxPathParams(int maxPathParams) -
getPathParam
-
setPathParamValue
-
setUriInfo
public void setUriInfo(jakarta.ws.rs.core.UriInfo uriInfo) -
getRequestEntity
-
setRequestEntity
-
getEntityWriter
-
setEntityWriter
-
getEndpointInstance
-
setEndpointInstance
-
getResult
-
getThrowable
- Overrides:
getThrowablein classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
getResponseEntity
-
setResult
-
handlesUnmappedException
public boolean handlesUnmappedException() -
handleUnmappedException
-
getTarget
-
mapExceptionIfPresent
public void mapExceptionIfPresent() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
getResponse
-
setResponse
-
getRequest
public jakarta.ws.rs.core.Request getRequest() -
getContainerRequestContext
-
getContainerResponseContext
-
getMethod
-
setMethod
-
setRemaining
-
getRemaining
-
getPathWithoutPrefix
Returns the normalised non-decoded path excluding any prefix. -
getPath
Returns the normalised non-decoded path including any prefix. -
getAbsoluteURI
-
getScheme
-
getAuthority
-
setRequestUri
-
setQueryParamsFrom
-
getResponseContentType
Returns the current response content type. If a response has been set and has an explicit content type then this is used, otherwise it returns any content type that has been explicitly set.- Specified by:
getResponseContentTypein interfaceServerRequestContext
-
getResponseMediaType
public jakarta.ws.rs.core.MediaType getResponseMediaType()- Specified by:
getResponseMediaTypein interfaceServerRequestContext
-
setResponseContentType
-
setResponseContentType
public ResteasyReactiveRequestContext setResponseContentType(jakarta.ws.rs.core.MediaType responseContentType) -
getAllAnnotations
-
setAllAnnotations
-
getMethodAnnotations
-
setMethodAnnotations
-
getAdditionalAnnotations
-
setAdditionalAnnotations
-
hasGenericReturnType
public boolean hasGenericReturnType() -
getGenericReturnType
-
setGenericReturnType
-
getAsyncResponse
-
setAsyncResponse
-
getReaderInterceptors
public jakarta.ws.rs.ext.ReaderInterceptor[] getReaderInterceptors() -
setReaderInterceptors
public ResteasyReactiveRequestContext setReaderInterceptors(jakarta.ws.rs.ext.ReaderInterceptor[] readerInterceptors) -
getWriterInterceptors
public jakarta.ws.rs.ext.WriterInterceptor[] getWriterInterceptors() -
setWriterInterceptors
public ResteasyReactiveRequestContext setWriterInterceptors(jakarta.ws.rs.ext.WriterInterceptor[] writerInterceptors) -
handleUnrecoverableError
- Specified by:
handleUnrecoverableErrorin classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
endResponse
protected void endResponse() -
handleRequestScopeActivation
protected void handleRequestScopeActivation()- Specified by:
handleRequestScopeActivationin classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
requestScopeDeactivated
protected void requestScopeDeactivated() -
restarted
protected void restarted(boolean keepTarget) - Specified by:
restartedin classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
saveUriMatchState
public void saveUriMatchState() -
getMatchedURIs
-
hasInputStream
public boolean hasInputStream() -
getInputStream
- Specified by:
getInputStreamin interfaceServerRequestContext
-
setInputStream
-
getSseEventSink
-
setSseEventSink
-
getPathSegments
Return the path segmentsThis is lazily initialized
-
initPathSegments
public void initPathSegments()initializes the path segments and removes any matrix params for the path used for matching. -
setProducesChecked
public void setProducesChecked(boolean checked) -
isProducesChecked
public boolean isProducesChecked() -
getHeader
- Specified by:
getHeaderin interfaceResteasyReactiveInjectionContext
-
getQueryParameter
-
getQueryParameter
- Specified by:
getQueryParameterin interfaceResteasyReactiveInjectionContext
-
getMatrixParameter
- Specified by:
getMatrixParameterin interfaceResteasyReactiveInjectionContext
-
getCookieParameter
- Specified by:
getCookieParameterin interfaceResteasyReactiveInjectionContext
-
getFormParameter
- Specified by:
getFormParameterin interfaceResteasyReactiveInjectionContext
-
getPathParameter
- Specified by:
getPathParameterin interfaceResteasyReactiveInjectionContext
-
unwrap
- Specified by:
unwrapin interfaceResteasyReactiveInjectionContext
-
getSecurityContext
public jakarta.ws.rs.core.SecurityContext getSecurityContext() -
isSecurityContextSet
public boolean isSecurityContextSet() -
createSecurityContext
protected jakarta.ws.rs.core.SecurityContext createSecurityContext() -
setSecurityContext
public ResteasyReactiveRequestContext setSecurityContext(jakarta.ws.rs.core.SecurityContext securityContext) -
securityContextUpdated
protected void securityContextUpdated(jakarta.ws.rs.core.SecurityContext securityContext) -
setOutputStream
-
getOutputStream
-
getOrCreateOutputStream
- Specified by:
getOrCreateOutputStreamin interfaceServerRequestContext
-
getResteasyReactiveResourceInfo
- Specified by:
getResteasyReactiveResourceInfoin interfaceServerRequestContext
-
getEventLoop
- Specified by:
getEventLoopin classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
registerTimer
-
getResourceLocatorPathParam
-
getFormData
-
setFormData
-
resumeExternalProcessing
public abstract boolean resumeExternalProcessing()
-