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.
  • Constructor Details

    • MaxLengthBodyParser

      protected MaxLengthBodyParser(long maxLength, HttpErrorHandler errorHandler)
  • Method Details

    • apply

      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 interface BodyParser<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