Package play.mvc
Class BodyParser.MaxLengthBodyParser<A>
- 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
Constructors Modifier Constructor Description protected
MaxLengthBodyParser(long maxLength, HttpErrorHandler errorHandler)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Accumulator<ByteString,F.Either<Result,A>>
apply(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 Detail
-
MaxLengthBodyParser
protected MaxLengthBodyParser(long maxLength, HttpErrorHandler errorHandler)
-
-
Method Detail
-
apply
public Accumulator<ByteString,F.Either<Result,A>> apply(Http.RequestHeader request)
Description copied from interface:BodyParser
Return 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:
apply
in interfaceBodyParser<A>
- Parameters:
request
- The request to create the body parser for.- Returns:
- The accumulator to parse the body.
-
apply1
protected abstract Accumulator<ByteString,F.Either<Result,A>> apply1(Http.RequestHeader request)
Implement this method to implement the actual body parser.- Parameters:
request
- header for the request to parse- Returns:
- the accumulator that parses the request
-
-