RandomCacheResourceSource (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.proxy
Class RandomCacheResourceSource

    java.lang.Object
      rabbit.httpio.FileResourceSource
          rabbit.proxy.CacheResourceSource
              rabbit.proxy.RandomCacheResourceSource

All Implemented Interfaces:
  ResourceSource, Transferable

    public class RandomCacheResourceSource

extends CacheResourceSource

A resource that gets ranges from the cache. This resource will read data from disk so it may block.

Author:
  Robert Olofsson

Field Summary

Fields inherited from class rabbit.httpio.FileResourceSource
`bufHandle, fc`

Constructor Summary
`RandomCacheResourceSource(Cache<HttpHeader,HttpHeader> cache, rabbit.proxy.RequestHandler rh, NioHandler tr, BufferHandler bufHandler, List<Range> ranges, long totalSize)`

Method Summary
`void` | `addBlockListener(BlockListener listener)` Generally we do not come into this method, but it can happen..
`boolean` | `supportsTransfer()` FileChannels can only be partially used so go with blocks.

Methods inherited from class rabbit.httpio.FileResourceSource
`length, release, transferTo`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RandomCacheResourceSource

    public RandomCacheResourceSource(Cache<HttpHeader,HttpHeader> cache,
                                     rabbit.proxy.RequestHandler rh,
                                     NioHandler tr,
                                     BufferHandler bufHandler,
                                     List<Range> ranges,
                                     long totalSize)
                              throws IOException

Throws:
  `IOException`

Method Detail

### supportsTransfer

    public boolean supportsTransfer()

  FileChannels can only be partially used so go with blocks.

  Specified by:
    `supportsTransfer` in interface `ResourceSource`
  Overrides:
    `supportsTransfer` in class `FileResourceSource`
  Returns:
    false

### addBlockListener

    public void addBlockListener(BlockListener listener)

  Description copied from class: `FileResourceSource`
  Generally we do not come into this method, but it can happen..

  Specified by:
    `addBlockListener` in interface `ResourceSource`
  Overrides:
    `addBlockListener` in class `FileResourceSource`

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