|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrabbit.httpio.BaseSocketHandler
rabbit.httpio.HttpHeaderReader
public class HttpHeaderReader
A handler that reads http headers
Constructor Summary | |
---|---|
HttpHeaderReader(SocketChannel channel,
BufferHandle bh,
NioHandler nioHandler,
TrafficLogger tl,
boolean request,
boolean strictHttp,
HttpHeaderListener reader)
|
Method Summary | |
---|---|
void |
closed()
Does nothing by default |
String |
getDescription()
Get a string description. |
void |
lineRead(String line)
Handle a newly read line. |
void |
read()
The channel is ready for read. |
void |
readHeader(String msg)
|
void |
readRequest()
|
void |
timeout()
Does nothing by default |
Methods inherited from class rabbit.httpio.BaseSocketHandler |
---|
closeDown, getBuffer, getBufferHandle, getChannel, getLogger, getTimeout, growBuffer, releaseBuffer, useSeparateThread, waitForRead, waitForWrite |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface rabbit.nio.SocketChannelHandler |
---|
getTimeout, useSeparateThread |
Constructor Detail |
---|
public HttpHeaderReader(SocketChannel channel, BufferHandle bh, NioHandler nioHandler, TrafficLogger tl, boolean request, boolean strictHttp, HttpHeaderListener reader)
request
- true if a request is read, false if a response is read.
Servers may respond without header (HTTP/0.9) so try to
handle that.Method Detail |
---|
public void readRequest() throws IOException
IOException
public String getDescription()
SocketChannelHandler
getDescription
in interface SocketChannelHandler
getDescription
in class BaseSocketHandler
public void closed()
BaseSocketHandler
closed
in interface SocketChannelHandler
closed
in class BaseSocketHandler
public void timeout()
BaseSocketHandler
timeout
in interface SocketChannelHandler
timeout
in class BaseSocketHandler
public void read()
ReadHandler
read
in interface ReadHandler
public void lineRead(String line) throws IOException
lineRead
in interface LineListener
line
- the line of text that have been read.
IOException
public void readHeader(String msg) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |