rabbit.httpio
Class HttpHeaderReader
java.lang.Object
rabbit.httpio.BaseSocketHandler
rabbit.httpio.HttpHeaderReader
- All Implemented Interfaces:
- Runnable, LineListener, SocketHandler
public class HttpHeaderReader
- extends BaseSocketHandler
- implements LineListener
A handler that reads http headers
- Author:
- Robert Olofsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpHeaderReader
public HttpHeaderReader(SocketChannel channel,
BufferHandle bh,
Selector selector,
Logger logger,
TrafficLogger tl,
boolean request,
boolean strictHttp,
HttpHeaderListener reader)
throws IOException
- Parameters:
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.
- Throws:
IOException
getDescription
public String getDescription()
- Description copied from interface:
SocketHandler
- Get a string description.
- Specified by:
getDescription
in interface SocketHandler
timeout
public void timeout()
- Description copied from interface:
SocketHandler
- Signal that the select operation timed out.
- Specified by:
timeout
in interface SocketHandler
run
public void run()
- Specified by:
run
in interface Runnable
getSocketOperations
protected int getSocketOperations()
- Specified by:
getSocketOperations
in class BaseSocketHandler
lineRead
public void lineRead(String line)
throws IOException
- Handle a newly read line.
- Specified by:
lineRead
in interface LineListener
- Parameters:
line
- the line of text that have been read.
- Throws:
IOException
readHeader
public void readHeader(String msg)
throws IOException
- Throws:
IOException