Package io.javalin.http.util
Class AsyncTaskConfig
-
- All Implemented Interfaces:
public final class AsyncTaskConfig
-
-
Field Summary
Fields Modifier and Type Field Description public ExecutorService
executor
public Long
timeout
-
Constructor Summary
Constructors Constructor Description AsyncTaskConfig()
-
Method Summary
Modifier and Type Method Description final Unit
onTimeout(Consumer<Context> timeoutListener)
Timeout listener executed when TimeoutException is thrown in specified task. -
-
Method Detail
-
onTimeout
final Unit onTimeout(Consumer<Context> timeoutListener)
Timeout listener executed when TimeoutException is thrown in specified task. This timeout listener is a part of request lifecycle, so you can still modify context here.
-
-
-
-