public class HttpReceiver extends Object implements HttpParser.ResponseHandler<ByteBuffer>
| Constructor and Description |
|---|
HttpReceiver(HttpConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort(Throwable cause) |
void |
badMessage(int status,
String reason)
Called to signal that a bad HTTP message has been received.
|
boolean |
content(ByteBuffer buffer) |
void |
earlyEOF()
Called to signal that an EOF was received unexpectedly
during the parsing of a HTTP message
|
protected boolean |
fail(Throwable failure) |
int |
getHeaderCacheSize() |
boolean |
headerComplete() |
void |
idleTimeout() |
boolean |
messageComplete() |
boolean |
parsedHeader(HttpField field)
This is the method called by parser when a HTTP Header name and value is found
|
void |
receive() |
boolean |
startResponse(HttpVersion version,
int status,
String reason)
This is the method called by parser when the HTTP request line is parsed
|
protected boolean |
success() |
public HttpReceiver(HttpConnection connection)
public void receive()
public int getHeaderCacheSize()
getHeaderCacheSize in interface HttpParser.HttpHandler<ByteBuffer>public boolean startResponse(HttpVersion version, int status, String reason)
HttpParser.ResponseHandlerstartResponse in interface HttpParser.ResponseHandler<ByteBuffer>public boolean parsedHeader(HttpField field)
HttpParser.HttpHandlerparsedHeader in interface HttpParser.HttpHandler<ByteBuffer>field - The field parsedpublic boolean headerComplete()
headerComplete in interface HttpParser.HttpHandler<ByteBuffer>public boolean content(ByteBuffer buffer)
content in interface HttpParser.HttpHandler<ByteBuffer>public boolean messageComplete()
messageComplete in interface HttpParser.HttpHandler<ByteBuffer>protected boolean success()
protected boolean fail(Throwable failure)
public void earlyEOF()
HttpParser.HttpHandlerearlyEOF in interface HttpParser.HttpHandler<ByteBuffer>public void badMessage(int status,
String reason)
HttpParser.HttpHandlerbadMessage in interface HttpParser.HttpHandler<ByteBuffer>status - The bad status to sendreason - The textual reason for badnesspublic void idleTimeout()
public boolean abort(Throwable cause)
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.