rabbit.httpio
Class BlockSender
java.lang.Object
rabbit.httpio.BaseSocketHandler
rabbit.httpio.BlockSender
- All Implemented Interfaces:
- SocketChannelHandler, WriteHandler
public class BlockSender
- extends BaseSocketHandler
- implements WriteHandler
A handler that writes data blocks.
- Author:
- Robert Olofsson
| Methods inherited from class rabbit.httpio.BaseSocketHandler |
closeDown, getBuffer, getBufferHandle, getChannel, getLargeBuffer, getLogger, getTimeout, isUsingSmallBuffer, releaseBuffer, useSeparateThread, waitForRead, waitForWrite |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlockSender
public BlockSender(SocketChannel channel,
NioHandler nioHandler,
TrafficLogger tl,
BufferHandle bufHandle,
boolean chunking,
BlockSentListener sender)
- Create a new BlockSender that will write data to the given channel
- Parameters:
channel - the SocketChannel to write the data tonioHandler - the NioHandler to use to wait for write readytl - the traffic statistics gathererbufHandle - the data to writechunking - if true chunk the data outsender - the listener that will be notified when the data has
been handled.
getDescription
public String getDescription()
- Specified by:
getDescription in interface SocketChannelHandler- Overrides:
getDescription 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
closed
public void closed()
- Description copied from class:
BaseSocketHandler
- Does nothing by default
- Specified by:
closed in interface SocketChannelHandler- Overrides:
closed in class BaseSocketHandler
write
public void write()
- Specified by:
write in interface WriteHandler