public abstract static class BodyParser.BufferingBodyParser<A> extends BodyParser.MaxLengthBodyParser<A>
BodyParser.AnyContent, BodyParser.BufferingBodyParser<A>, BodyParser.Bytes, BodyParser.Default, BodyParser.DelegatingBodyParser<A,B>, BodyParser.Empty, BodyParser.FormUrlEncoded, BodyParser.Json, BodyParser.MaxLengthBodyParser<A>, BodyParser.MultipartFormData, BodyParser.Of, BodyParser.Raw, BodyParser.Text, BodyParser.TolerantJson, BodyParser.TolerantText, BodyParser.TolerantXml, BodyParser.Xml
Modifier | Constructor and Description |
---|---|
protected |
BufferingBodyParser(play.api.http.HttpConfiguration httpConfiguration,
HttpErrorHandler errorHandler,
java.lang.String errorMessage) |
protected |
BufferingBodyParser(long maxLength,
HttpErrorHandler errorHandler,
java.lang.String errorMessage) |
Modifier and Type | Method and Description |
---|---|
protected Accumulator<akka.util.ByteString,F.Either<Result,A>> |
apply1(Http.RequestHeader request)
Implement this method to implement the actual body parser.
|
protected abstract A |
parse(Http.RequestHeader request,
akka.util.ByteString bytes)
Parse the body.
|
apply
protected BufferingBodyParser(long maxLength, HttpErrorHandler errorHandler, java.lang.String errorMessage)
protected BufferingBodyParser(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler, java.lang.String errorMessage)
protected final Accumulator<akka.util.ByteString,F.Either<Result,A>> apply1(Http.RequestHeader request)
BodyParser.MaxLengthBodyParser
apply1
in class BodyParser.MaxLengthBodyParser<A>
request
- header for the request to parseprotected abstract A parse(Http.RequestHeader request, akka.util.ByteString bytes) throws java.lang.Exception
request
- The request associated with the body.bytes
- The bytes of the body.java.lang.Exception
- If the body failed to parse. It is assumed that any exceptions thrown by this method are
the fault of the client, so a 400 bad request error will be returned if this method throws an exception.