public class HTTP1ClientResponseHandler extends Object implements HttpParser.ResponseHandler
| 限定符和类型 | 字段和说明 |
|---|---|
protected ClientHTTPHandler |
clientHTTPHandler |
protected HTTP1ClientConnection |
connection |
protected static Log |
log |
protected HTTPOutputStream |
outputStream |
protected MetaData.Request |
request |
protected MetaData.Response |
response |
| 限定符和类型 | 方法和说明 |
|---|---|
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() |
protected boolean |
http1MessageComplete() |
boolean |
messageComplete() |
void |
parsedHeader(HttpField field)
This is the method called by parser when a HTTP Header name and value
is found
|
boolean |
startResponse(HttpVersion version,
int status,
String reason)
This is the method called by parser when the HTTP request line is
parsed
|
protected static final Log log
protected HTTP1ClientConnection connection
protected MetaData.Response response
protected MetaData.Request request
protected HTTPOutputStream outputStream
protected final ClientHTTPHandler clientHTTPHandler
public final boolean startResponse(HttpVersion version, int status, String reason)
HttpParser.ResponseHandlerstartResponse 在接口中 HttpParser.ResponseHandlerversion - the http version in usestatus - the response statusreason - the response reason phrasepublic final void parsedHeader(HttpField field)
HttpParser.HttpHandlerparsedHeader 在接口中 HttpParser.HttpHandlerfield - The field parsedpublic final int getHeaderCacheSize()
getHeaderCacheSize 在接口中 HttpParser.HttpHandlerpublic final boolean content(ByteBuffer item)
content 在接口中 HttpParser.HttpHandlerpublic final boolean headerComplete()
headerComplete 在接口中 HttpParser.HttpHandlerprotected boolean http1MessageComplete()
public final boolean messageComplete()
messageComplete 在接口中 HttpParser.HttpHandlerpublic final 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.HttpHandlerCopyright © 2016. All rights reserved.