HttpHeaderReader (RabbIT/4)
Date: 2009-12-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.httpio
Class HttpHeaderReader

    java.lang.Object
      rabbit.httpio.BaseSocketHandler
          rabbit.httpio.HttpHeaderReader

All Implemented Interfaces:
  LineListener, ReadHandler, SocketChannelHandler

    public class HttpHeaderReader

extends BaseSocketHandler
implements LineListener, ReadHandler

A handler that reads http headers

Author:
  Robert Olofsson

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, 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

### HttpHeaderReader

    public HttpHeaderReader(SocketChannel channel,
                            BufferHandle bh,
                            NioHandler nioHandler,
                            TrafficLogger tl,
                            boolean request,
                            boolean strictHttp,
                            HttpHeaderListener reader)

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.

Method Detail

### readRequest

    public void readRequest()
                     throws IOException

  Throws:
    `IOException`

### getDescription

    public String getDescription()

  Description copied from interface: `SocketChannelHandler`
  Get a string description.

  Specified by:
    `getDescription` in interface `SocketChannelHandler`
  Overrides:
    `getDescription` in class `BaseSocketHandler`

### closed

    public void closed()

  Description copied from class: `BaseSocketHandler`
  Does nothing by default

  Specified by:
    `closed` in interface `SocketChannelHandler`
  Overrides:
    `closed` in class `BaseSocketHandler`

### timeout

    public void timeout()

  Description copied from class: `BaseSocketHandler`
  Does nothing by default

  Specified by:
    `timeout` in interface `SocketChannelHandler`
  Overrides:
    `timeout` in class `BaseSocketHandler`

### read

    public void read()

  Description copied from interface: `ReadHandler`
  The channel is ready for read.

  Specified by:
    `read` in interface `ReadHandler`

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD