|
||||||||||
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(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(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(SocketChannel channel, NioHandler nioHandler, TrafficLogger tl, BufferHandler bufHandler, HttpHeader header, boolean fullURI, boolean strictHttp, HttpResponseListener listener) throws 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.
IOException
- if the request can not be sentMethod 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 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 |