Class AbstractResteasyReactiveContext<T extends AbstractResteasyReactiveContext<T,H>,H extends RestHandler<T>>
java.lang.Object
org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<T,H>
- All Implemented Interfaces:
Closeable,AutoCloseable,Runnable,ResteasyReactiveCallbackContext
public abstract class AbstractResteasyReactiveContext<T extends AbstractResteasyReactiveContext<T,H>,H extends RestHandler<T>>
extends Object
implements Runnable, Closeable, ResteasyReactiveCallbackContext
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractResteasyReactiveContext(H[] handlerChain, H[] abortHandlerChain, ThreadSetupAction requestContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCaptures the CDI request scope for use outside of handler chains.voidclose()H[]protected abstract ExecutorH[]intgetProperty(String name) voidIf we are on the abort chain already, send a 500.voidhandleException(Throwable t, boolean keepSameTarget) protected abstract voidprotected abstract voidhandleUnrecoverableError(Throwable throwable) protected voidinvokeHandler(int pos) protected booleanbooleanvoidregisterCompletionCallback(jakarta.ws.rs.container.CompletionCallback callback) voidregisterConnectionCallback(jakarta.ws.rs.container.ConnectionCallback callback) voidremoveProperty(String name) protected voidvoidEnsures the CDI request scope is running when inside a handler chainvoidRestarts handler chain processing on a chain that does not target a specific resourcevoidprotected abstract voidrestarted(boolean keepTarget) voidresume()voidvoidvoidvoidrun()setAbortHandlerChain(H[] abortHandlerChain) voidsetAbortHandlerChainStarted(boolean value) setPosition(int position) voidsetProperty(String name, Object object) setSuspended(boolean suspended) voidsuspend()protected Throwable
-
Field Details
-
log
protected static final org.jboss.logging.Logger log -
logWebApplicationExceptions
protected static final org.jboss.logging.Logger logWebApplicationExceptions -
handlers
-
abortHandlerChain
-
position
protected int position -
throwable
-
CUSTOM_RR_PROPERTIES_PREFIX
- See Also:
-
-
Constructor Details
-
AbstractResteasyReactiveContext
public AbstractResteasyReactiveContext(H[] handlerChain, H[] abortHandlerChain, ThreadSetupAction requestContext)
-
-
Method Details
-
suspend
public void suspend() -
resume
public void resume() -
resume
-
resume
-
resume
-
getAbortHandlerChain
-
setAbortHandlerChain
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getThrowable
-
getEventLoop
-
getContextExecutor
-
isRequestScopeManagementRequired
protected boolean isRequestScopeManagementRequired() -
run
public void run() -
invokeHandler
- Throws:
Exception
-
beginAsyncProcessing
protected void beginAsyncProcessing() -
requestScopeDeactivated
protected void requestScopeDeactivated() -
requireCDIRequestScope
public void requireCDIRequestScope()Ensures the CDI request scope is running when inside a handler chain -
captureCDIRequestScope
Captures the CDI request scope for use outside of handler chains. -
handleRequestScopeActivation
protected abstract void handleRequestScopeActivation() -
restart
Restarts handler chain processing on a chain that does not target a specific resourceGenerally used to abort processing.
- Parameters:
newHandlerChain- The new handler chain
-
restart
-
restarted
protected abstract void restarted(boolean keepTarget) -
isSuspended
public boolean isSuspended() -
setSuspended
-
getPosition
public int getPosition() -
setPosition
-
getHandlers
-
handleException
If we are on the abort chain already, send a 500. If not, turn the throwable into a response result and switch to the abort chain -
handleException
-
unwrapException
-
handleUnrecoverableError
-
getProperty
-
getPropertyNames
-
setProperty
-
removeProperty
-
registerCompletionCallback
public void registerCompletionCallback(jakarta.ws.rs.container.CompletionCallback callback) - Specified by:
registerCompletionCallbackin interfaceResteasyReactiveCallbackContext
-
registerConnectionCallback
public void registerConnectionCallback(jakarta.ws.rs.container.ConnectionCallback callback) - Specified by:
registerConnectionCallbackin interfaceResteasyReactiveCallbackContext
-
setAbortHandlerChainStarted
public void setAbortHandlerChainStarted(boolean value)
-