public interface HttpMessageParser<Output extends ParserOutput>
Common logic for http request and response message parsing
Modifier and Type | Interface and Description |
---|---|
static interface |
HttpMessageParser.StateResult |
static class |
HttpMessageParser.Trampoline |
static class |
HttpMessageParser.Trampoline$ |
Modifier and Type | Method and Description |
---|---|
<A extends ParserOutput> |
chunkedEntity(scala.Option<Content$minusType> cth) |
scala.Function0<scala.Option<ParserOutput.ErrorOutput>> |
completionHandling() |
ContentType |
contentType(scala.Option<Content$minusType> cth) |
<A extends ParserOutput> |
defaultEntity(scala.Option<Content$minusType> cth,
long contentLength) |
HttpMessageParser.StateResult |
done()
Use
continue or terminate 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(org.apache.pekko.util.ByteString input)
invoked if the specified protocol is unknown
|
Output |
parseBytes(org.apache.pekko.util.ByteString input) |
HttpMessageParser.StateResult |
parseChunk(org.apache.pekko.util.ByteString input,
int offset,
boolean isLastMessage,
long totalBytesRead) |
HttpMessageParser.StateResult |
parseEntity(scala.collection.immutable.List<HttpHeader> headers,
HttpProtocol protocol,
org.apache.pekko.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,
org.apache.pekko.util.ByteString input,
int bodyStart) |
HttpMessageParser.StateResult |
parseHeaderLines(org.apache.pekko.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,
org.apache.pekko.util.ByteString input,
int lineStart) |
HttpMessageParser.StateResult |
parseMessage(org.apache.pekko.util.ByteString input,
int offset) |
int |
parseProtocol(org.apache.pekko.util.ByteString input,
int cursor) |
Output |
parseSessionBytes(org.apache.pekko.stream.TLSProtocol.SessionBytes input) |
void |
setCompletionHandling(scala.Function0<scala.Option<ParserOutput.ErrorOutput>> completionHandling) |
ParserSettings |
settings() |
boolean |
shouldComplete() |
HttpMessageParser.StateResult |
startNewMessage(org.apache.pekko.util.ByteString input,
int offset) |
ParserOutput.StrictEntityCreator<Output,UniversalEntity> |
strictEntity(scala.Option<Content$minusType> cth,
org.apache.pekko.util.ByteString input,
int bodyStart,
int contentLength) |
HttpMessageParser.StateResult |
terminate() |
boolean |
terminated() |
scala.Function0<scala.Option<ParserOutput.ErrorOutput>> completionHandling()
boolean terminated()
ParserSettings settings()
HttpHeaderParser headerParser()
boolean isResponseParser()
scala.runtime.Nothing$ onBadProtocol(org.apache.pekko.util.ByteString input)
HttpMessageParser.StateResult parseMessage(org.apache.pekko.util.ByteString input, int offset)
HttpMessageParser.StateResult parseEntity(scala.collection.immutable.List<HttpHeader> headers, HttpProtocol protocol, org.apache.pekko.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)
scala.collection.mutable.ListBuffer<HttpHeader> initialHeaderBuffer()
Output parseSessionBytes(org.apache.pekko.stream.TLSProtocol.SessionBytes input)
Output parseBytes(org.apache.pekko.util.ByteString input)
Output doPull()
boolean shouldComplete()
HttpMessageParser.StateResult startNewMessage(org.apache.pekko.util.ByteString input, int offset)
int parseProtocol(org.apache.pekko.util.ByteString input, int cursor)
HttpMessageParser.StateResult parseHeaderLines(org.apache.pekko.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)
ch
- connection headerclh
- content-lengthcth
- content-typeteh
- transfer-encodinge100c
- expect 100 continuehh
- host header seeninput
- (undocumented)lineStart
- (undocumented)headers
- (undocumented)headerCount
- (undocumented)isChunked
- (undocumented)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, org.apache.pekko.util.ByteString input, int lineStart)
HttpMessageParser.StateResult parseFixedLengthBody(long remainingBodyBytes, boolean isLastMessage, org.apache.pekko.util.ByteString input, int bodyStart)
HttpMessageParser.StateResult parseChunk(org.apache.pekko.util.ByteString input, int offset, boolean isLastMessage, long totalBytesRead)
void emit(Output output)
HttpMessageParser.StateResult failMessageStart(java.lang.String summary)
HttpMessageParser.StateResult failMessageStart(java.lang.String summary, java.lang.String detail)
HttpMessageParser.StateResult failMessageStart(StatusCode status)
HttpMessageParser.StateResult failMessageStart(StatusCode status, java.lang.String summary, java.lang.String detail)
HttpMessageParser.StateResult failMessageStart(StatusCode status, ErrorInfo info)
HttpMessageParser.StateResult failEntityStream(java.lang.String summary)
HttpMessageParser.StateResult failEntityStream(java.lang.String summary, java.lang.String detail)
HttpMessageParser.StateResult failEntityStream(ErrorInfo info)
HttpMessageParser.StateResult terminate()
HttpMessageParser.StateResult done()
continue
or terminate
to suspend or terminate processing.
Do not call this directly.ContentType contentType(scala.Option<Content$minusType> cth)
ParserOutput.StrictEntityCreator<Output,UniversalEntity> emptyEntity(scala.Option<Content$minusType> cth)
ParserOutput.StrictEntityCreator<Output,UniversalEntity> strictEntity(scala.Option<Content$minusType> cth, org.apache.pekko.util.ByteString input, int bodyStart, int contentLength)
<A extends ParserOutput> ParserOutput.StreamedEntityCreator<A,UniversalEntity> defaultEntity(scala.Option<Content$minusType> cth, long contentLength)
<A extends ParserOutput> ParserOutput.StreamedEntityCreator<A,RequestEntity> chunkedEntity(scala.Option<Content$minusType> cth)
void setCompletionHandling(scala.Function0<scala.Option<ParserOutput.ErrorOutput>> completionHandling)