public class HttpReceiver extends Object implements HttpParser.ResponseHandler<ByteBuffer>
| Constructor and Description |
|---|
HttpReceiver(HttpConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort(HttpExchange exchange,
Throwable cause) |
void |
badMessage(int status,
String reason) |
boolean |
content(ByteBuffer buffer) |
boolean |
earlyEOF() |
protected boolean |
fail(Throwable failure) |
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 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 - TODOpublic 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 boolean earlyEOF()
earlyEOF in interface HttpParser.HttpHandler<ByteBuffer>public void badMessage(int status,
String reason)
badMessage in interface HttpParser.HttpHandler<ByteBuffer>public void idleTimeout()
public boolean abort(HttpExchange exchange, Throwable cause)
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.