public class HTTP1ServerRequestHandler extends Object implements HttpParser.RequestHandler
| 限定符和类型 | 字段和说明 |
|---|---|
protected HTTP1ServerConnection |
connection |
protected static Log |
log |
protected com.firefly.server.http2.HTTP1ServerConnection.HTTP1ServerResponseOutputStream |
outputStream |
protected MetaData.Request |
request |
protected MetaData.Response |
response |
protected ServerHTTPHandler |
serverHTTPHandler |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
badMessage(int status,
String reason)
Called to signal that a bad HTTP message has been received.
|
boolean |
content(ByteBuffer item) |
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
|
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 Log log
protected MetaData.Request request
protected MetaData.Response response
protected HTTP1ServerConnection connection
protected com.firefly.server.http2.HTTP1ServerConnection.HTTP1ServerResponseOutputStream outputStream
protected final ServerHTTPHandler serverHTTPHandler
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 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 © 2016. All rights reserved.