Class ManagedExecutorDefinitionServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
ee.jakarta.tck.concurrent.framework.TestServlet
ee.jakarta.tck.concurrent.spec.ManagedExecutorService.resourcedef.ManagedExecutorDefinitionServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
@WebServlet("/ManagedExecutorDefinitionServlet")
public class ManagedExecutorDefinitionServlet
extends TestServlet
- See Also:
-
Field Summary
Fields inherited from class ee.jakarta.tck.concurrent.framework.TestServlet
FAILURE, nl, SUCCESS, TEST_METHOD
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
ManagedExecutorService submits an action to run asynchronously as a CompletionStage.void
Asynchronous method that returns CompletableFuture runs asynchronously and can run successfully to completion or be signaled to end prematurely (if so implemented) by completing its CompletableFuture.void
Asynchronous method that returns a CompletionStage runs asynchronously on the specified executor.void
Asynchronous method with no return type (void) runs asynchronously.void
ManagedExecutorService creates a completed CompletableFuture to which async dependent stages can be chained.void
ManagedExecutorService can create a contextualized copy of an unmanaged CompletableFuture.void
ManagedExecutorService creates an incomplete CompletableFuture to which dependent stages can be chained.void
A ManagedExecutorDefinition with all attributes configured enforces maxAsync and propagates context.void
A ManagedExecutorDefinition with minimal attributes can run multiple async tasks concurrently and uses java:comp/DefaultContextService to determine context propagation and clearing.void
Ensure completion of scheduled asynch after completing exceptionallyvoid
void
void
void
void
void
void
Methods inherited from class ee.jakarta.tck.concurrent.framework.TestServlet
after, before, beforeClass, doGet, doPost, getResponse, invokeTest, sendPostData
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
ManagedExecutorDefinitionServlet
public ManagedExecutorDefinitionServlet()
-
-
Method Details
-
testAsyncCompletionStage
ManagedExecutorService submits an action to run asynchronously as a CompletionStage. Dependent stages can be chained to the CompletionStage, and all stages run with the thread context of the thread from which they were created, per ManagedExecutorDefinition config.- Throws:
Throwable
-
testAsynchronousMethodReturnsCompletableFuture
Asynchronous method that returns CompletableFuture runs asynchronously and can run successfully to completion or be signaled to end prematurely (if so implemented) by completing its CompletableFuture.- Throws:
Exception
-
testAsynchronousMethodReturnsCompletionStage
Asynchronous method that returns a CompletionStage runs asynchronously on the specified executor.- Throws:
Exception
-
testAsynchronousMethodVoidReturnType
Asynchronous method with no return type (void) runs asynchronously.- Throws:
Exception
-
testCompletedFuture
ManagedExecutorService creates a completed CompletableFuture to which async dependent stages can be chained. The dependent stages all run with the thread context of the thread from which they were created, per ManagedExecutorDefinition config.- Throws:
Throwable
-
testCopyCompletableFuture
ManagedExecutorService can create a contextualized copy of an unmanaged CompletableFuture.- Throws:
Throwable
-
testIncompleteFuture
ManagedExecutorService creates an incomplete CompletableFuture to which dependent stages can be chained. The CompletableFuture can be completed from another thread lacking the same context, but the dependent stages all run with the thread context of the thread from which they were created, per ManagedExecutorDefinition config.- Throws:
Throwable
-
testManagedExecutorDefinitionAllAttributes
A ManagedExecutorDefinition with all attributes configured enforces maxAsync and propagates context.- Throws:
Throwable
-
testManagedExecutorDefinitionDefaults
A ManagedExecutorDefinition with minimal attributes can run multiple async tasks concurrently and uses java:comp/DefaultContextService to determine context propagation and clearing.- Throws:
Throwable
-
testScheduledAsynchCompletedFuture
- Throws:
Throwable
-
testScheduledAsynchCompletedResult
- Throws:
Throwable
-
testScheduledAsynchCompletedExceptionally
public void testScheduledAsynchCompletedExceptionally()Ensure completion of scheduled asynch after completing exceptionally -
testScheduledAsynchOverlapSkipping
- Throws:
Throwable
-
testScheduledAsynchIgnoresMaxAsync
- Throws:
Throwable
-
testScheduledAsynchWithMultipleSchedules
- Throws:
Throwable
-
testScheduledAsynchWithInvalidJNDIName
public void testScheduledAsynchWithInvalidJNDIName() -
testScheduledAsynchVoidReturn
public void testScheduledAsynchVoidReturn()
-