Package akka.http.impl.engine.parsing
Interface HttpMessageParser<Output extends ParserOutput>
-
- All Known Implementing Classes:
HttpResponseParser
public interface HttpMessageParser<Output extends ParserOutput>
INTERNAL APICommon logic for http request and response message parsing
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
HttpMessageParser.StateResult
static class
HttpMessageParser.Trampoline
static class
HttpMessageParser.Trampoline$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <A extends ParserOutput>
ParserOutput.StreamedEntityCreator<A,RequestEntity>chunkedEntity(scala.Option<Content$minusType> cth)
scala.Function0<scala.Option<ParserOutput.ErrorOutput>>
completionHandling()
ContentType
contentType(scala.Option<Content$minusType> cth)
<A extends ParserOutput>
ParserOutput.StreamedEntityCreator<A,UniversalEntity>defaultEntity(scala.Option<Content$minusType> cth, long contentLength)
HttpMessageParser.StateResult
done()
Use {@link continue} orterminate()
to suspend or terminate processing.Output
doPull()
void
emit(Output output)
ParserOutput.StrictEntityCreator<Output,UniversalEntity>
emptyEntity(scala.Option<Content$minusType> cth)
HttpMessageParser.StateResult
failEntityStream(ErrorInfo info)
HttpMessageParser.StateResult
failEntityStream(java.lang.String summary)
HttpMessageParser.StateResult
failEntityStream(java.lang.String summary, java.lang.String detail)
HttpMessageParser.StateResult
failMessageStart(StatusCode status)
HttpMessageParser.StateResult
failMessageStart(StatusCode status, ErrorInfo info)
HttpMessageParser.StateResult
failMessageStart(StatusCode status, java.lang.String summary, java.lang.String detail)
HttpMessageParser.StateResult
failMessageStart(java.lang.String summary)
HttpMessageParser.StateResult
failMessageStart(java.lang.String summary, java.lang.String detail)
HttpHeaderParser
headerParser()
scala.collection.mutable.ListBuffer<HttpHeader>
initialHeaderBuffer()
boolean
isResponseParser()
scala.runtime.Nothing$
onBadProtocol(akka.util.ByteString input)
invoked if the specified protocol is unknownOutput
parseBytes(akka.util.ByteString input)
HttpMessageParser.StateResult
parseChunk(akka.util.ByteString input, int offset, boolean isLastMessage, long totalBytesRead)
HttpMessageParser.StateResult
parseEntity(scala.collection.immutable.List<HttpHeader> headers, HttpProtocol protocol, akka.util.ByteString input, int bodyStart, scala.Option<Content$minusLength> clh, scala.Option<Content$minusType> cth, boolean isChunked, boolean expect100continue, boolean hostHeaderPresent, boolean closeAfterResponseCompletion, javax.net.ssl.SSLSession sslSession)
HttpMessageParser.StateResult
parseFixedLengthBody(long remainingBodyBytes, boolean isLastMessage, akka.util.ByteString input, int bodyStart)
HttpMessageParser.StateResult
parseHeaderLines(akka.util.ByteString input, int lineStart, scala.collection.mutable.ListBuffer<HttpHeader> headers, int headerCount, scala.Option<Connection> ch, scala.Option<Content$minusLength> clh, scala.Option<Content$minusType> cth, boolean isChunked, boolean e100c, boolean hh)
HttpMessageParser.StateResult
parseHeaderLinesAux(scala.collection.mutable.ListBuffer<HttpHeader> headers, int headerCount, scala.Option<Connection> ch, scala.Option<Content$minusLength> clh, scala.Option<Content$minusType> cth, boolean isChunked, boolean e100c, boolean hh, akka.util.ByteString input, int lineStart)
HttpMessageParser.StateResult
parseMessage(akka.util.ByteString input, int offset)
int
parseProtocol(akka.util.ByteString input, int cursor)
Output
parseSessionBytes(akka.stream.TLSProtocol.SessionBytes input)
void
setCompletionHandling(scala.Function0<scala.Option<ParserOutput.ErrorOutput>> completionHandling)
ParserSettings
settings()
boolean
shouldComplete()
HttpMessageParser.StateResult
startNewMessage(akka.util.ByteString input, int offset)
ParserOutput.StrictEntityCreator<Output,UniversalEntity>
strictEntity(scala.Option<Content$minusType> cth, akka.util.ByteString input, int bodyStart, int contentLength)
HttpMessageParser.StateResult
terminate()
boolean
terminated()
-
-
-
Method Detail
-
completionHandling
scala.Function0<scala.Option<ParserOutput.ErrorOutput>> completionHandling()
-
terminated
boolean terminated()
-
settings
ParserSettings settings()
-
headerParser
HttpHeaderParser headerParser()
-
isResponseParser
boolean isResponseParser()
-
onBadProtocol
scala.runtime.Nothing$ onBadProtocol(akka.util.ByteString input)
invoked if the specified protocol is unknown
-
parseMessage
HttpMessageParser.StateResult parseMessage(akka.util.ByteString input, int offset)
-
parseEntity
HttpMessageParser.StateResult parseEntity(scala.collection.immutable.List<HttpHeader> headers, HttpProtocol protocol, akka.util.ByteString input, int bodyStart, scala.Option<Content$minusLength> clh, scala.Option<Content$minusType> cth, boolean isChunked, boolean expect100continue, boolean hostHeaderPresent, boolean closeAfterResponseCompletion, javax.net.ssl.SSLSession sslSession)
-
initialHeaderBuffer
scala.collection.mutable.ListBuffer<HttpHeader> initialHeaderBuffer()
-
parseSessionBytes
Output parseSessionBytes(akka.stream.TLSProtocol.SessionBytes input)
-
parseBytes
Output parseBytes(akka.util.ByteString input)
-
doPull
Output doPull()
-
shouldComplete
boolean shouldComplete()
-
startNewMessage
HttpMessageParser.StateResult startNewMessage(akka.util.ByteString input, int offset)
-
parseProtocol
int parseProtocol(akka.util.ByteString input, int cursor)
-
parseHeaderLines
HttpMessageParser.StateResult parseHeaderLines(akka.util.ByteString input, int lineStart, scala.collection.mutable.ListBuffer<HttpHeader> headers, int headerCount, scala.Option<Connection> ch, scala.Option<Content$minusLength> clh, scala.Option<Content$minusType> cth, boolean isChunked, boolean e100c, boolean hh)
- Parameters:
ch
- connection headerclh
- content-lengthcth
- content-typeteh
- transfer-encodinge100c
- expect 100 continuehh
- host header seeninput
- (undocumented)lineStart
- (undocumented)headers
- (undocumented)headerCount
- (undocumented)isChunked
- (undocumented)- Returns:
- (undocumented)
-
parseHeaderLinesAux
HttpMessageParser.StateResult parseHeaderLinesAux(scala.collection.mutable.ListBuffer<HttpHeader> headers, int headerCount, scala.Option<Connection> ch, scala.Option<Content$minusLength> clh, scala.Option<Content$minusType> cth, boolean isChunked, boolean e100c, boolean hh, akka.util.ByteString input, int lineStart)
-
parseFixedLengthBody
HttpMessageParser.StateResult parseFixedLengthBody(long remainingBodyBytes, boolean isLastMessage, akka.util.ByteString input, int bodyStart)
-
parseChunk
HttpMessageParser.StateResult parseChunk(akka.util.ByteString input, int offset, boolean isLastMessage, long totalBytesRead)
-
emit
void emit(Output output)
-
failMessageStart
HttpMessageParser.StateResult failMessageStart(java.lang.String summary)
-
failMessageStart
HttpMessageParser.StateResult failMessageStart(java.lang.String summary, java.lang.String detail)
-
failMessageStart
HttpMessageParser.StateResult failMessageStart(StatusCode status)
-
failMessageStart
HttpMessageParser.StateResult failMessageStart(StatusCode status, java.lang.String summary, java.lang.String detail)
-
failMessageStart
HttpMessageParser.StateResult failMessageStart(StatusCode status, ErrorInfo info)
-
failEntityStream
HttpMessageParser.StateResult failEntityStream(java.lang.String summary)
-
failEntityStream
HttpMessageParser.StateResult failEntityStream(java.lang.String summary, java.lang.String detail)
-
failEntityStream
HttpMessageParser.StateResult failEntityStream(ErrorInfo info)
-
terminate
HttpMessageParser.StateResult terminate()
-
done
HttpMessageParser.StateResult done()
Use {@link continue} orterminate()
to suspend or terminate processing. Do not call this directly.- Returns:
- (undocumented)
-
contentType
ContentType contentType(scala.Option<Content$minusType> cth)
-
emptyEntity
ParserOutput.StrictEntityCreator<Output,UniversalEntity> emptyEntity(scala.Option<Content$minusType> cth)
-
strictEntity
ParserOutput.StrictEntityCreator<Output,UniversalEntity> strictEntity(scala.Option<Content$minusType> cth, akka.util.ByteString input, int bodyStart, int contentLength)
-
defaultEntity
<A extends ParserOutput> ParserOutput.StreamedEntityCreator<A,UniversalEntity> defaultEntity(scala.Option<Content$minusType> cth, long contentLength)
-
chunkedEntity
<A extends ParserOutput> ParserOutput.StreamedEntityCreator<A,RequestEntity> chunkedEntity(scala.Option<Content$minusType> cth)
-
setCompletionHandling
void setCompletionHandling(scala.Function0<scala.Option<ParserOutput.ErrorOutput>> completionHandling)
-
-