|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rabbit.httpio.HttpResponseReader
public class HttpResponseReader
A handler that write one http header and reads a response
Constructor Summary | |
---|---|
HttpResponseReader(SocketChannel channel,
NioHandler nioHandler,
TrafficLogger tl,
BufferHandler bufHandler,
HttpHeader header,
boolean fullURI,
boolean strictHttp,
HttpResponseListener listener)
|
Method Summary | |
---|---|
void |
closed()
The socket connection has been closed, either by this end or the other side. |
void |
failed(Exception cause)
Reading failed |
void |
httpHeaderRead(HttpHeader header,
BufferHandle bh,
boolean keepalive,
boolean isChunked,
long dataSize)
One http header has been read |
void |
httpHeaderSent()
The http header has been sent. |
void |
sendRequestAndWaitForResponse()
|
void |
timeout()
The operation timed out |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpResponseReader(SocketChannel channel, NioHandler nioHandler, TrafficLogger tl, BufferHandler bufHandler, HttpHeader header, boolean fullURI, boolean strictHttp, HttpResponseListener listener) throws IOException
IOException
Method Detail |
---|
public void sendRequestAndWaitForResponse() throws IOException
IOException
public void httpHeaderSent()
HttpHeaderSentListener
httpHeaderSent
in interface HttpHeaderSentListener
public void httpHeaderRead(HttpHeader header, BufferHandle bh, boolean keepalive, boolean isChunked, long dataSize)
HttpHeaderListener
httpHeaderRead
in interface HttpHeaderListener
header
- the HttpHeader that was readbh
- the BufferHandle that may or may not hold unread data.keepalive
- if the sender want to use keepalive.isChunked
- if false content is not chunked,
if true content is chunked.dataSize
- the contents size or -1 if size is unknown.public void closed()
HttpHeaderListener
closed
in interface HttpHeaderListener
public void failed(Exception cause)
AsyncListener
failed
in interface AsyncListener
cause
- the real reason the operation failed.public void timeout()
AsyncListener
timeout
in interface AsyncListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |