| Modifier and Type | Field and Description |
|---|---|
| private final EntityManagerFactory | |
| private final EntityManagerHolder | |
| private volatile boolean | |
| private static final Log | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <T> void | afterCompletion(NativeWebRequest
the current request request, Callable<T> the task for the current async request task)Overrides default org. |
| public <T> void | afterCompletion(NativeWebRequest
the current request request, DeferredResult<T> the DeferredResult for the current request deferredResult)Overrides default org. |
| public void | |
| private void | |
| public <T> Object | handleError(NativeWebRequest
the current request request, Callable<T> the task for the current async request task, Throwable the error that occurred while request processing t)Overrides default org. Callable task completes.
|
| public <T> boolean | handleError(NativeWebRequest
the current request request, DeferredResult<T> the DeferredResult for the current request; if the
deferredResult, Throwable DeferredResult is set, then concurrent processing is resumed and
subsequent interceptors are not invokedthe error that occurred while request processing t)Overrides default org. DeferredResult has been set.
|
| public <T> Object | handleTimeout(NativeWebRequest
the current request request, Callable<T> the task for the current async request task)Overrides default org. Callable task completes.
|
| public <T> boolean | handleTimeout(NativeWebRequest
the current request request, DeferredResult<T> the DeferredResult for the current request; if the
deferredResult)DeferredResult is set, then concurrent processing is resumed and
subsequent interceptors are not invokedOverrides default org. DeferredResult has been set.
|
| public <T> void | postProcess(NativeWebRequest
the current request request, Callable<T> the task for the current async request task, Object the result of concurrent processing, which could
be a concurrentResult)Throwable if the Callable raised an exceptionOverrides default org. Callable has produced a result in the
async thread in which the Callable is executed.
|
| public <T> void | preProcess(NativeWebRequest
the current request request, Callable<T> the task for the current async request task)Overrides default org. Callable is executed and before the
actual invocation of the Callable.
|
| emFactory | back to summary |
|---|---|
| private final EntityManagerFactory emFactory | |
| emHolder | back to summary |
|---|---|
| private final EntityManagerHolder emHolder | |
| errorInProgress | back to summary |
|---|---|
| private volatile boolean errorInProgress | |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| timeoutInProgress | back to summary |
|---|---|
| private volatile boolean timeoutInProgress | |
| AsyncRequestInterceptor | back to summary |
|---|---|
| public AsyncRequestInterceptor(EntityManagerFactory emFactory, EntityManagerHolder emHolder) | |
| afterCompletion | back to summary |
|---|---|
| public <T> void afterCompletion(NativeWebRequest request, Callable<T> task) throws Exception Overrides default org. Doc from org. Invoked from a container thread when async processing completes for any reason including timeout or network error. The default implementation is empty.
| |
| afterCompletion | back to summary |
|---|---|
| public <T> void afterCompletion(NativeWebRequest request, DeferredResult<T> deferredResult) Overrides default org. Doc from org. Invoked from a container thread when an async request completed for any
reason including timeout and network error. This method is useful for
detecting that a
| |
| bindEntityManager | back to summary |
|---|---|
| public void bindEntityManager() | |
| closeEntityManager | back to summary |
|---|---|
| private void closeEntityManager() | |
| handleError | back to summary |
|---|---|
| public <T> Object handleError(NativeWebRequest request, Callable<T> task, Throwable t) Overrides default org. Doc from org. Invoked from a container thread when an error occurred while processing
the async request before the The default implementation always returns
| |
| handleError | back to summary |
|---|---|
| public <T> boolean handleError(NativeWebRequest request, DeferredResult<T> deferredResult, Throwable t) Overrides default org. Doc from org. Invoked from a container thread when an error occurred while processing an async request
before the
| |
| handleTimeout | back to summary |
|---|---|
| public <T> Object handleTimeout(NativeWebRequest request, Callable<T> task) Overrides default org. Doc from org. Invoked from a container thread when the async request times out before
the The default implementation always returns
| |
| handleTimeout | back to summary |
|---|---|
| public <T> boolean handleTimeout(NativeWebRequest request, DeferredResult<T> deferredResult) Overrides default org. Doc from org. Invoked from a container thread when an async request times out before
the
| |
| postProcess | back to summary |
|---|---|
| public <T> void postProcess(NativeWebRequest request, Callable<T> task, Object concurrentResult) Overrides default org. Doc from org. Invoked after the The default implementation is empty.
| |
| preProcess | back to summary |
|---|---|
| public <T> void preProcess(NativeWebRequest request, Callable<T> task) Overrides default org. Doc from org. Invoked after the start of concurrent handling in the async
thread in which the The default implementation is empty.
| |