Package play.mvc
Class BodyParser.MaxLengthBodyParser<A>
java.lang.Object
play.mvc.BodyParser.MaxLengthBodyParser<A>
- All Implemented Interfaces:
BodyParser<A>
- Direct Known Subclasses:
BodyParser.BufferingBodyParser,BodyParser.DelegatingMultipartFormDataBodyParser,BodyParser.TemporaryFile,BodyParser.ToFile
- Enclosing interface:
- BodyParser<A>
public abstract static class BodyParser.MaxLengthBodyParser<A>
extends Object
implements BodyParser<A>
Abstract body parser that enforces a maximum length.
-
Nested Class Summary
Nested classes/interfaces inherited from interface play.mvc.BodyParser
BodyParser.AnyContent, BodyParser.BufferingBodyParser<A>, BodyParser.Bytes, BodyParser.CompletableBodyParser<A>, BodyParser.Default, BodyParser.DelegatingBodyParser<A,B>, BodyParser.DelegatingMultipartFormDataBodyParser<A>, BodyParser.Empty, BodyParser.FormUrlEncoded, BodyParser.Json, BodyParser.MaxLengthBodyParser<A>, BodyParser.MultipartFormData, BodyParser.Of, BodyParser.Raw, BodyParser.TemporaryFile, BodyParser.Text, BodyParser.ToFile, BodyParser.TolerantJson, BodyParser.TolerantText, BodyParser.TolerantXml, BodyParser.Xml -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMaxLengthBodyParser(long maxLength, HttpErrorHandler errorHandler) -
Method Summary
Modifier and TypeMethodDescriptionapply(Http.RequestHeader request) Return an accumulator to parse the body of the given HTTP request.protected abstract Accumulator<ByteString,F.Either<Result, A>> apply1(Http.RequestHeader request) Implement this method to implement the actual body parser.
-
Constructor Details
-
MaxLengthBodyParser
-
-
Method Details
-
apply
Description copied from interface:BodyParserReturn an accumulator to parse the body of the given HTTP request.The accumulator should either produce a result if an error was encountered, or the parsed body.
- Specified by:
applyin interfaceBodyParser<A>- Parameters:
request- The request to create the body parser for.- Returns:
- The accumulator to parse the body.
-
apply1
Implement this method to implement the actual body parser.- Parameters:
request- header for the request to parse- Returns:
- the accumulator that parses the request
-