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 java.lang.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 classEagerFormParsingHandler.Builder
-
Field Summary
Fields Modifier and Type Field Description static HandlerWrapperWRAPPER
-
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 HttpHandlergetNext()voidhandleRequest(HttpServerExchange exchange)Handle the request.EagerFormParsingHandlersetNext(HttpHandler next)java.lang.StringtoString()
-
-
-
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 java.lang.Exception
Description copied from interface:HttpHandlerHandle the request.- Specified by:
handleRequestin interfaceHttpHandler- Parameters:
exchange- the HTTP request/response exchange- Throws:
java.lang.Exception
-
getNext
public HttpHandler getNext()
-
setNext
public EagerFormParsingHandler setNext(HttpHandler next)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-