public class HTTP1ServerRequestHandler extends Object implements HttpParser.RequestHandler
| 限定符和类型 | 字段和说明 |
|---|---|
protected HTTP1ServerConnection |
connection |
protected static org.slf4j.Logger |
log |
protected com.firefly.server.http2.HTTP1ServerConnection.HTTP1ServerResponseOutputStream |
outputStream |
protected MetaData.Request |
request |
protected MetaData.Response |
response |
protected ServerHTTPHandler |
serverHTTPHandler |
protected HttpFields |
trailer |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
badMessage(int status,
String reason)
Called to signal that a bad HTTP message has been received.
|
boolean |
content(ByteBuffer item) |
boolean |
contentComplete() |
void |
earlyEOF()
Called to signal that an EOF was received unexpectedly
during the parsing of a HTTP message
|
int |
getHeaderCacheSize() |
boolean |
headerComplete() |
boolean |
messageComplete() |
void |
parsedHeader(HttpField field)
This is the method called by parser when a HTTP Header name and value is found
|
void |
parsedTrailer(HttpField field)
This is the method called by parser when a HTTP Trailer name and value is found
|
boolean |
startRequest(String method,
String uri,
HttpVersion version)
This is the method called by parser when the HTTP request line is parsed
|
protected static final org.slf4j.Logger log
protected MetaData.Request request
protected MetaData.Response response
protected HTTP1ServerConnection connection
protected com.firefly.server.http2.HTTP1ServerConnection.HTTP1ServerResponseOutputStream outputStream
protected final ServerHTTPHandler serverHTTPHandler
protected HttpFields trailer
public boolean startRequest(String method, String uri, HttpVersion version)
HttpParser.RequestHandlerstartRequest 在接口中 HttpParser.RequestHandlermethod - The methoduri - The raw bytes of the URI. These are copied into a ByteBuffer that will not be changed until this parser is reset and reused.version - the http version in usepublic void parsedHeader(HttpField field)
HttpParser.HttpHandlerparsedHeader 在接口中 HttpParser.HttpHandlerfield - The field parsedpublic boolean headerComplete()
headerComplete 在接口中 HttpParser.HttpHandlerpublic boolean content(ByteBuffer item)
content 在接口中 HttpParser.HttpHandlerpublic boolean contentComplete()
contentComplete 在接口中 HttpParser.HttpHandlerpublic void parsedTrailer(HttpField field)
HttpParser.HttpHandlerparsedTrailer 在接口中 HttpParser.HttpHandlerfield - The field parsedpublic boolean messageComplete()
messageComplete 在接口中 HttpParser.HttpHandlerpublic void badMessage(int status,
String reason)
HttpParser.HttpHandlerbadMessage 在接口中 HttpParser.HttpHandlerstatus - The bad status to sendreason - The textual reason for badnesspublic void earlyEOF()
HttpParser.HttpHandlerearlyEOF 在接口中 HttpParser.HttpHandlerpublic int getHeaderCacheSize()
getHeaderCacheSize 在接口中 HttpParser.HttpHandlerCopyright © 2017. All rights reserved.