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
-
Constructor Summary
ConstructorDescriptionAbstractResteasyReactiveContext
(H[] handlerChain, H[] abortHandlerChain, ThreadSetupAction requestContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Captures the CDI request scope for use outside of handler chains.void
close()
H[]
protected abstract Executor
H[]
int
getProperty
(String name) void
If we are on the abort chain already, send a 500.void
handleException
(Throwable t, boolean keepSameTarget) protected abstract void
protected abstract void
handleUnrecoverableError
(Throwable throwable) protected void
invokeHandler
(int pos) protected boolean
boolean
void
registerCompletionCallback
(jakarta.ws.rs.container.CompletionCallback callback) void
registerConnectionCallback
(jakarta.ws.rs.container.ConnectionCallback callback) void
removeProperty
(String name) protected void
void
Ensures the CDI request scope is running when inside a handler chainvoid
Restarts handler chain processing on a chain that does not target a specific resourcevoid
protected abstract void
restarted
(boolean keepTarget) void
resume()
void
void
void
void
run()
setAbortHandlerChain
(H[] abortHandlerChain) void
setAbortHandlerChainStarted
(boolean value) setPosition
(int position) void
setProperty
(String name, Object object) setSuspended
(boolean suspended) void
suspend()
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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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:
registerCompletionCallback
in interfaceResteasyReactiveCallbackContext
-
registerConnectionCallback
public void registerConnectionCallback(jakarta.ws.rs.container.ConnectionCallback callback) - Specified by:
registerConnectionCallback
in interfaceResteasyReactiveCallbackContext
-
setAbortHandlerChainStarted
public void setAbortHandlerChainStarted(boolean value)
-