Class SynchronousDispatcher
java.lang.Object
org.jboss.resteasy.core.SynchronousDispatcher
- All Implemented Interfaces:
Dispatcher
- Direct Known Subclasses:
AsynchronousDispatcher
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected ResteasyProviderFactory
protected Registry
protected List
<HttpRequestPreprocessor> -
Constructor Summary
ConstructorDescriptionSynchronousDispatcher
(ResteasyProviderFactory providerFactory) SynchronousDispatcher
(ResteasyProviderFactory providerFactory, ResourceMethodRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHttpPreprocessor
(HttpRequestPreprocessor httpPreprocessor) void
asynchronousDelivery
(HttpRequest request, HttpResponse response, jakarta.ws.rs.core.Response jaxrsResponse) Deprecated.void
asynchronousDelivery
(HttpRequest request, HttpResponse response, jakarta.ws.rs.core.Response jaxrsResponse, Consumer<Throwable> onComplete) void
asynchronousExceptionDelivery
(HttpRequest request, HttpResponse response, Throwable exception) Deprecated.void
asynchronousExceptionDelivery
(HttpRequest request, HttpResponse response, Throwable exception, Consumer<Throwable> onComplete) void
jakarta.ws.rs.core.Response
execute
(HttpRequest request, HttpResponse response, ResourceInvoker invoker) Return a response wither from an invoke or exception handling.getInvoker
(HttpRequest request) jakarta.ws.rs.core.Response
internalInvocation
(HttpRequest request, HttpResponse response, Object entity) void
invoke
(HttpRequest request, HttpResponse response) void
invoke
(HttpRequest request, HttpResponse response, ResourceInvoker invoker) Invoke and write response.void
invokePropagateNotFound
(HttpRequest request, HttpResponse response) Propagate NotFoundException.jakarta.ws.rs.core.Response
preprocess
(HttpRequest request) protected void
preprocess
(HttpRequest request, HttpResponse response, Runnable continuation) Call pre-process ContainerRequestFilters.void
pushContextObjects
(HttpRequest request, HttpResponse response) static <T extends Throwable>
voidvoid
unhandledAsynchronousException
(HttpResponse response, Throwable ex) void
writeException
(HttpRequest request, HttpResponse response, Throwable e) Deprecated.void
writeException
(HttpRequest request, HttpResponse response, Throwable e, Consumer<Throwable> onComplete) protected void
writeResponse
(HttpRequest request, HttpResponse response, jakarta.ws.rs.core.Response jaxrsResponse)
-
Field Details
-
providerFactory
-
registry
-
requestPreprocessors
-
defaultContextObjects
-
unwrappedExceptions
-
bufferExceptionEntityRead
protected boolean bufferExceptionEntityRead -
bufferExceptionEntity
protected boolean bufferExceptionEntity
-
-
Constructor Details
-
SynchronousDispatcher
-
SynchronousDispatcher
public SynchronousDispatcher(ResteasyProviderFactory providerFactory, ResourceMethodRegistry registry)
-
-
Method Details
-
getProviderFactory
- Specified by:
getProviderFactory
in interfaceDispatcher
-
getRegistry
- Specified by:
getRegistry
in interfaceDispatcher
-
getDefaultContextObjects
- Specified by:
getDefaultContextObjects
in interfaceDispatcher
-
getUnwrappedExceptions
-
preprocess
-
preprocess
Call pre-process ContainerRequestFilters.- Parameters:
request
- http requestresponse
- http responsecontinuation
- runnable
-
rethrow
-
writeException
Deprecated. -
writeException
public void writeException(HttpRequest request, HttpResponse response, Throwable e, Consumer<Throwable> onComplete) -
invoke
- Specified by:
invoke
in interfaceDispatcher
-
invokePropagateNotFound
public void invokePropagateNotFound(HttpRequest request, HttpResponse response) throws jakarta.ws.rs.NotFoundException Propagate NotFoundException. This is used for Filters.- Parameters:
request
- http requestresponse
- http response- Throws:
jakarta.ws.rs.NotFoundException
-
getInvoker
- Throws:
Failure
-
pushContextObjects
-
internalInvocation
public jakarta.ws.rs.core.Response internalInvocation(HttpRequest request, HttpResponse response, Object entity) - Specified by:
internalInvocation
in interfaceDispatcher
-
clearContextData
public void clearContextData() -
execute
public jakarta.ws.rs.core.Response execute(HttpRequest request, HttpResponse response, ResourceInvoker invoker) Return a response wither from an invoke or exception handling.- Parameters:
request
- http requestresponse
- http responseinvoker
- resource invoker- Returns:
- response
-
invoke
Invoke and write response.- Parameters:
request
- http requestresponse
- http responseinvoker
- resource invoker
-
asynchronousDelivery
@Deprecated public void asynchronousDelivery(HttpRequest request, HttpResponse response, jakarta.ws.rs.core.Response jaxrsResponse) throws IOException Deprecated.- Throws:
IOException
-
asynchronousDelivery
public void asynchronousDelivery(HttpRequest request, HttpResponse response, jakarta.ws.rs.core.Response jaxrsResponse, Consumer<Throwable> onComplete) throws IOException - Throws:
IOException
-
unhandledAsynchronousException
-
asynchronousExceptionDelivery
@Deprecated public void asynchronousExceptionDelivery(HttpRequest request, HttpResponse response, Throwable exception) Deprecated. -
asynchronousExceptionDelivery
public void asynchronousExceptionDelivery(HttpRequest request, HttpResponse response, Throwable exception, Consumer<Throwable> onComplete) -
writeResponse
protected void writeResponse(HttpRequest request, HttpResponse response, jakarta.ws.rs.core.Response jaxrsResponse) -
addHttpPreprocessor
- Specified by:
addHttpPreprocessor
in interfaceDispatcher
-