Package io.undertow.server.handlers.form
Class EagerFormParsingHandler
- java.lang.Object
-
- io.undertow.server.handlers.form.EagerFormParsingHandler
-
- All Implemented Interfaces:
HttpHandler
public class EagerFormParsingHandler extends Object implements HttpHandler
Handler that eagerly parses form data. The request chain will pause while the data is being read, and then continue when the form data is fully passed.NOTE: This is not strictly compatible with servlet, as it removes the option for the user to parse the request themselves, however in practice this requirement is probably rare, and using this handler gives a significant performance advantage in that a thread is not blocked for the duration of the upload.
- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EagerFormParsingHandler.Builder
-
Field Summary
Fields Modifier and Type Field Description static HandlerWrapper
WRAPPER
-
Constructor Summary
Constructors Constructor Description EagerFormParsingHandler()
EagerFormParsingHandler(FormParserFactory formParserFactory)
EagerFormParsingHandler(HttpHandler next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpHandler
getNext()
void
handleRequest(HttpServerExchange exchange)
Handle the request.EagerFormParsingHandler
setNext(HttpHandler next)
String
toString()
-
-
-
Field Detail
-
WRAPPER
public static final HandlerWrapper WRAPPER
-
-
Constructor Detail
-
EagerFormParsingHandler
public EagerFormParsingHandler(FormParserFactory formParserFactory)
-
EagerFormParsingHandler
public EagerFormParsingHandler()
-
EagerFormParsingHandler
public EagerFormParsingHandler(HttpHandler next)
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
getNext
public HttpHandler getNext()
-
setNext
public EagerFormParsingHandler setNext(HttpHandler next)
-
-