Package io.javalin.http.util
Class AsyncExecutor
-
- All Implemented Interfaces:
public final class AsyncExecutor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
AsyncExecutor.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static AsyncExecutor.Companion
Companion
-
Constructor Summary
Constructors Constructor Description AsyncExecutor(ExecutorService defaultExecutor)
-
Method Summary
Modifier and Type Method Description final Unit
submitAsyncTask(Context context, AsyncTaskConfig asyncTaskConfig, ThrowingRunnable<Exception> task)
Utility method that executes task asynchronously using executor (defaultExecutor by default). -
-
Constructor Detail
-
AsyncExecutor
AsyncExecutor(ExecutorService defaultExecutor)
-
-
Method Detail
-
submitAsyncTask
final Unit submitAsyncTask(Context context, AsyncTaskConfig asyncTaskConfig, ThrowingRunnable<Exception> task)
Utility method that executes task asynchronously using executor (defaultExecutor by default). It also provides custom timeout handling via onTimeout callback registered directly on underlying CompletableFuture, so global HttpConfig.asyncTimeout does not affect this particular task.
-
-
-
-