public class HttpReceiver extends Object implements HttpParser.ResponseHandler<ByteBuffer>
Constructor and Description |
---|
HttpReceiver(HttpConnection connection) |
Modifier and Type | Method and Description |
---|---|
void |
badMessage(int status,
String reason) |
boolean |
content(ByteBuffer buffer) |
boolean |
earlyEOF() |
protected void |
fail(Throwable failure) |
boolean |
headerComplete() |
void |
idleTimeout() |
boolean |
messageComplete(long contentLength) |
boolean |
parsedHeader(HttpHeader header,
String name,
String value)
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 void |
success() |
public HttpReceiver(HttpConnection connection)
public void receive()
public boolean startResponse(HttpVersion version, int status, String reason)
HttpParser.ResponseHandler
startResponse
in interface HttpParser.ResponseHandler<ByteBuffer>
public boolean parsedHeader(HttpHeader header, String name, String value)
HttpParser.HttpHandler
parsedHeader
in interface HttpParser.HttpHandler<ByteBuffer>
header
- The HttpHeader value if there is a matchname
- The String value of the header namevalue
- The String value of the headerpublic boolean headerComplete()
headerComplete
in interface HttpParser.HttpHandler<ByteBuffer>
public boolean content(ByteBuffer buffer)
content
in interface HttpParser.HttpHandler<ByteBuffer>
public boolean messageComplete(long contentLength)
messageComplete
in interface HttpParser.HttpHandler<ByteBuffer>
protected void success()
protected void 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()
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.