org.littleshoot.proxy
Class DefaultCachedHttpChunks

java.lang.Object
  extended by org.littleshoot.proxy.DefaultCachedHttpChunks
All Implemented Interfaces:
CachedHttpChunks

public class DefaultCachedHttpChunks
extends Object
implements CachedHttpChunks

Class that keep track of the cached HTTP chunks for a single HTTP response.


Constructor Summary
DefaultCachedHttpChunks(net.sf.ehcache.CacheManager cacheManager, org.jboss.netty.handler.codec.http.HttpRequest httpRequest, org.jboss.netty.channel.ChannelFutureListener writeListener)
          Creates a new class for caching HTTP chunks for a single response.
 
Method Summary
 void cache(org.jboss.netty.handler.codec.http.HttpChunk chunk, org.jboss.netty.buffer.ChannelBuffer encoded)
           
 boolean isComplete()
           
 boolean writeAllChunks(org.jboss.netty.channel.Channel channel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCachedHttpChunks

public DefaultCachedHttpChunks(net.sf.ehcache.CacheManager cacheManager,
                               org.jboss.netty.handler.codec.http.HttpRequest httpRequest,
                               org.jboss.netty.channel.ChannelFutureListener writeListener)
Creates a new class for caching HTTP chunks for a single response.

Parameters:
cacheManager - The class that manages the cache.
httpRequest - The original request.
writeListener - The class for listening to write events that takes appropriate actions such as closing the connection.
Method Detail

cache

public void cache(org.jboss.netty.handler.codec.http.HttpChunk chunk,
                  org.jboss.netty.buffer.ChannelBuffer encoded)
Specified by:
cache in interface CachedHttpChunks

isComplete

public boolean isComplete()
Specified by:
isComplete in interface CachedHttpChunks

writeAllChunks

public boolean writeAllChunks(org.jboss.netty.channel.Channel channel)
Specified by:
writeAllChunks in interface CachedHttpChunks


Copyright © 2009-2012 LittleShoot. All Rights Reserved.