rabbit.httpio
Class HttpHeaderSender

java.lang.Object
  extended by rabbit.httpio.HttpHeaderSender
All Implemented Interfaces:
AsyncListener, BlockSentListener

public class HttpHeaderSender
extends Object
implements BlockSentListener

A handler that writes http headers

Author:
Robert Olofsson

Constructor Summary
HttpHeaderSender(SocketChannel channel, NioHandler nioHandler, TrafficLogger tl, HttpHeader header, boolean fullURI, HttpHeaderSentListener sender)
           
 
Method Summary
 void blockSent()
          The http header has been sent.
 void failed(Exception cause)
          Reading failed
 void sendHeader()
           
 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

HttpHeaderSender

public HttpHeaderSender(SocketChannel channel,
                        NioHandler nioHandler,
                        TrafficLogger tl,
                        HttpHeader header,
                        boolean fullURI,
                        HttpHeaderSentListener sender)
                 throws IOException
Parameters:
fullURI - if false then try to change header.uri into just the file.
Throws:
IOException
Method Detail

sendHeader

public void sendHeader()
                throws IOException
Throws:
IOException

timeout

public void timeout()
Description copied from interface: AsyncListener
The operation timed out

Specified by:
timeout in interface AsyncListener

failed

public void failed(Exception cause)
Description copied from interface: AsyncListener
Reading failed

Specified by:
failed in interface AsyncListener
Parameters:
cause - the real reason the operation failed.

blockSent

public void blockSent()
Description copied from interface: BlockSentListener
The http header has been sent.

Specified by:
blockSent in interface BlockSentListener