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
Fields Modifier and Type Field Description protected Deploymentdeploymentstatic Object[]EMPTY_ARRAY-
Fields inherited from class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext
abortHandlerChain, CUSTOM_RR_PROPERTIES_PREFIX, handlers, log, logWebApplicationExceptions, position, throwable
-
-
Constructor Summary
Constructors Constructor Description ResteasyReactiveRequestContext(Deployment deployment, ThreadSetupAction requestContext, ServerRestHandler[] handlerChain, ServerRestHandler[] abortHandlerChain)
-
Method Summary
-
Methods 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, unwrapException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.resteasy.reactive.common.core.ResteasyReactiveCallbackContext
registerCompletionCallback, registerConnectionCallback
-
-
-
-
Field Detail
-
EMPTY_ARRAY
public static final Object[] EMPTY_ARRAY
-
deployment
protected final Deployment deployment
-
-
Constructor Detail
-
ResteasyReactiveRequestContext
public ResteasyReactiveRequestContext(Deployment deployment, ThreadSetupAction requestContext, ServerRestHandler[] handlerChain, ServerRestHandler[] abortHandlerChain)
-
-
Method Detail
-
serverRequest
public abstract ServerHttpRequest serverRequest()
-
serverResponse
public abstract ServerHttpResponse serverResponse()
- Specified by:
serverResponsein interfaceServerRequestContext
-
getRequestHeaders
public jakarta.ws.rs.core.HttpHeaders getRequestHeaders()
- Specified by:
getRequestHeadersin interfaceServerRequestContext
-
getDeployment
public Deployment getDeployment()
-
getProviders
public ProvidersImpl getProviders()
-
restart
public void restart(RuntimeResource target)
Restarts handler chain processing with a new chain targeting a new resource.- Parameters:
target- The resource target
-
restart
public void restart(RuntimeResource target, boolean setLocatorTarget)
-
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
public HttpHeadersImpl getHttpHeaders()
-
getParameters
public Object[] getParameters()
-
setMaxPathParams
public void setMaxPathParams(int maxPathParams)
-
getPathParam
public String getPathParam(int index, boolean encoded)
-
setPathParamValue
public ResteasyReactiveRequestContext setPathParamValue(int index, String value)
-
setUriInfo
public void setUriInfo(jakarta.ws.rs.core.UriInfo uriInfo)
-
getRequestEntity
public Object getRequestEntity()
-
setRequestEntity
public ResteasyReactiveRequestContext setRequestEntity(Object requestEntity)
-
getEntityWriter
public EntityWriter getEntityWriter()
-
setEntityWriter
public ResteasyReactiveRequestContext setEntityWriter(EntityWriter entityWriter)
-
getEndpointInstance
public Object getEndpointInstance()
-
setEndpointInstance
public ResteasyReactiveRequestContext setEndpointInstance(Object endpointInstance)
-
getResult
public Object getResult()
-
getThrowable
public Throwable getThrowable()
- Overrides:
getThrowablein classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
getResponseEntity
public Object getResponseEntity()
-
setResult
public ResteasyReactiveRequestContext setResult(Object result)
-
handlesUnmappedException
public boolean handlesUnmappedException()
-
handleUnmappedException
public void handleUnmappedException(Throwable throwable)
-
getTarget
public RuntimeResource getTarget()
-
mapExceptionIfPresent
public void mapExceptionIfPresent()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
getResponse
public LazyResponse getResponse()
-
setResponse
public ResteasyReactiveRequestContext setResponse(LazyResponse response)
-
getRequest
public jakarta.ws.rs.core.Request getRequest()
-
getContainerRequestContext
public ContainerRequestContextImpl getContainerRequestContext()
-
getContainerResponseContext
public ContainerResponseContextImpl getContainerResponseContext()
-
getMethod
public String getMethod()
-
setMethod
public void setMethod(String method)
-
setRemaining
public void setRemaining(String remaining)
-
getRemaining
public String getRemaining()
-
getPathWithoutPrefix
public String getPathWithoutPrefix()
Returns the normalised non-decoded path excluding any prefix.
-
getPath
public String getPath()
Returns the normalised non-decoded path including any prefix.
-
getAbsoluteURI
public String getAbsoluteURI()
-
getScheme
public String getScheme()
-
getAuthority
public String getAuthority()
-
setRequestUri
public ResteasyReactiveRequestContext setRequestUri(URI requestURI)
-
setQueryParamsFrom
protected void setQueryParamsFrom(String uri)
-
getResponseContentType
public EncodedMediaType 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
public ResteasyReactiveRequestContext setResponseContentType(EncodedMediaType responseContentType)
-
setResponseContentType
public ResteasyReactiveRequestContext setResponseContentType(jakarta.ws.rs.core.MediaType responseContentType)
-
getAllAnnotations
public Annotation[] getAllAnnotations()
-
setAllAnnotations
public void setAllAnnotations(Annotation[] annotations)
-
getMethodAnnotations
public Annotation[] getMethodAnnotations()
-
setMethodAnnotations
public ResteasyReactiveRequestContext setMethodAnnotations(Annotation[] methodAnnotations)
-
getAdditionalAnnotations
public Annotation[] getAdditionalAnnotations()
-
setAdditionalAnnotations
public void setAdditionalAnnotations(Annotation[] additionalAnnotations)
-
hasGenericReturnType
public boolean hasGenericReturnType()
-
getGenericReturnType
public Type getGenericReturnType()
-
setGenericReturnType
public ResteasyReactiveRequestContext setGenericReturnType(Type genericReturnType)
-
getAsyncResponse
public AsyncResponseImpl getAsyncResponse()
-
setAsyncResponse
public ResteasyReactiveRequestContext setAsyncResponse(AsyncResponseImpl asyncResponse)
-
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
protected void handleUnrecoverableError(Throwable throwable)
- 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()
-
hasInputStream
public boolean hasInputStream()
-
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStreamin interfaceServerRequestContext
-
setInputStream
public ResteasyReactiveRequestContext setInputStream(InputStream inputStream)
-
getSseEventSink
public SseEventSinkImpl getSseEventSink()
-
setSseEventSink
public void setSseEventSink(SseEventSinkImpl sseEventSink)
-
getPathSegments
public List<jakarta.ws.rs.core.PathSegment> 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.
-
getHeader
public Object getHeader(String name, boolean single)
- Specified by:
getHeaderin interfaceResteasyReactiveInjectionContext
-
getQueryParameter
public Object getQueryParameter(String name, boolean single, boolean encoded, String separator)
- Specified by:
getQueryParameterin interfaceResteasyReactiveInjectionContext
-
getMatrixParameter
public Object getMatrixParameter(String name, boolean single, boolean encoded)
- Specified by:
getMatrixParameterin interfaceResteasyReactiveInjectionContext
-
getCookieParameter
public String getCookieParameter(String name)
- Specified by:
getCookieParameterin interfaceResteasyReactiveInjectionContext
-
getFormParameter
public Object getFormParameter(String name, boolean single, boolean encoded)
- Specified by:
getFormParameterin interfaceResteasyReactiveInjectionContext
-
getPathParameter
public String getPathParameter(String name, boolean encoded)
- Specified by:
getPathParameterin interfaceResteasyReactiveInjectionContext
-
unwrap
public <T> T unwrap(Class<T> type)
- 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
public void setOutputStream(OutputStream outputStream)
-
getOutputStream
public OutputStream getOutputStream()
-
getOrCreateOutputStream
public OutputStream getOrCreateOutputStream()
- Specified by:
getOrCreateOutputStreamin interfaceServerRequestContext
-
getResteasyReactiveResourceInfo
public ResteasyReactiveResourceInfo getResteasyReactiveResourceInfo()
- Specified by:
getResteasyReactiveResourceInfoin interfaceServerRequestContext
-
getEventLoop
protected abstract Executor getEventLoop()
- Specified by:
getEventLoopin classAbstractResteasyReactiveContext<ResteasyReactiveRequestContext,ServerRestHandler>
-
getResourceLocatorPathParam
public String getResourceLocatorPathParam(String name, boolean encoded)
-
getFormData
public FormData getFormData()
-
setFormData
public ResteasyReactiveRequestContext setFormData(FormData formData)
-
resumeExternalProcessing
public abstract boolean resumeExternalProcessing()
-
-