|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.httpio.HttpResponseReader
public class HttpResponseReader
A handler that write one http header and reads a response
| Constructor Summary | |
|---|---|
HttpResponseReader(java.nio.channels.SocketChannel channel,
NioHandler nioHandler,
TrafficLogger tl,
BufferHandler bufHandler,
HttpHeader header,
boolean fullURI,
boolean strictHttp,
HttpResponseListener listener)
Create a new HttpResponseReader. |
|
| Method Summary | |
|---|---|
void |
closed()
The socket connection has been closed, either by this end or the other side. |
void |
failed(java.lang.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()
Start the process of sending the header and reading the response. |
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(java.nio.channels.SocketChannel channel,
NioHandler nioHandler,
TrafficLogger tl,
BufferHandler bufHandler,
HttpHeader header,
boolean fullURI,
boolean strictHttp,
HttpResponseListener listener)
throws java.io.IOException
channel - the Channel to the clientnioHandler - the NioHandler to use for network and background taskstl - the network statistics gathererbufHandler - the BufferHandler to useheader - the request to sendfullURI - if true the request will have a full uri instead of just
a relative onestrictHttp - if true then use strict httplistener - the listener that will be notified when the response has
been read.
java.io.IOException - if the request can not be sent| Method Detail |
|---|
public void sendRequestAndWaitForResponse()
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 HttpHeaderListenerheader - 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 HttpHeaderListenerpublic void failed(java.lang.Exception cause)
AsyncListener
failed in interface AsyncListenercause - 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 | |||||||||