Package io.undertow.server.handlers
Class StuckThreadDetectionHandler
java.lang.Object
io.undertow.server.handlers.StuckThreadDetectionHandler
- All Implemented Interfaces:
HttpHandler
This valve allows to detect requests that take a long time to process, which might
indicate that the thread that is processing it is stuck.
Based on code proposed by TomLu in Bugzilla entry #50306
- Author:
- slaurent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong[]
int
void
handleRequest
(HttpServerExchange exchange) Handle the request.toString()
-
Field Details
-
DEFAULT_THRESHOLD
public static final int DEFAULT_THRESHOLD- See Also:
-
-
Constructor Details
-
StuckThreadDetectionHandler
-
StuckThreadDetectionHandler
-
-
Method Details
-
getThreshold
public int getThreshold()- Returns:
- The current threshold in seconds
-
handleRequest
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
getStuckThreadIds
public long[] getStuckThreadIds() -
toString
-