org.littleshoot.proxy
Class DefaultCachedHttpResponse

java.lang.Object
  extended by org.littleshoot.proxy.DefaultCachedHttpResponse
All Implemented Interfaces:
CachedHttpResponse

public class DefaultCachedHttpResponse
extends Object
implements CachedHttpResponse

Default implementation for storing HTTP response data in the cache.


Constructor Summary
DefaultCachedHttpResponse(org.jboss.netty.buffer.ChannelBuffer channelBuffer, org.jboss.netty.channel.ChannelFutureListener channelFutureListener)
          Creates a new cached response.
 
Method Summary
 org.jboss.netty.buffer.ChannelBuffer getChannelBuffer()
          Accessor for the raw data for the response.
 org.jboss.netty.channel.ChannelFutureListener getChannelFutureListener()
          Accessor for the listener for once the response is written.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCachedHttpResponse

public DefaultCachedHttpResponse(org.jboss.netty.buffer.ChannelBuffer channelBuffer,
                                 org.jboss.netty.channel.ChannelFutureListener channelFutureListener)
Creates a new cached response.

Parameters:
channelBuffer - The channel buffer with data to write.
channelFutureListener - The class for listening to write events that takes appropriate actions such as closing the connection.
Method Detail

getChannelBuffer

public org.jboss.netty.buffer.ChannelBuffer getChannelBuffer()
Description copied from interface: CachedHttpResponse
Accessor for the raw data for the response.

Specified by:
getChannelBuffer in interface CachedHttpResponse
Returns:
The raw data for the response.

getChannelFutureListener

public org.jboss.netty.channel.ChannelFutureListener getChannelFutureListener()
Description copied from interface: CachedHttpResponse
Accessor for the listener for once the response is written. This will take the appropriate action based on HTTP rules, such as closing the connection.

Specified by:
getChannelFutureListener in interface CachedHttpResponse
Returns:
The class for listening for write events on the completed response.


Copyright © 2009-2013 LittleShoot. All Rights Reserved.