org.directwebremoting.impl
Class InMemoryDownloadManager

java.lang.Object
  extended by org.directwebremoting.impl.PurgingDownloadManager
      extended by org.directwebremoting.impl.InMemoryDownloadManager
All Implemented Interfaces:
DownloadManager

public class InMemoryDownloadManager
extends PurgingDownloadManager
implements DownloadManager

A DownloadManager that simply stores the links in-memory. This implementation has the advantage that it is simple - no disk storage is required, however in anything but a lightly used system it could cause significant memory usage.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Nested Class Summary
 
Nested classes/interfaces inherited from class org.directwebremoting.impl.PurgingDownloadManager
PurgingDownloadManager.DownloadPurge
 
Constructor Summary
InMemoryDownloadManager()
           
 
Method Summary
 FileTransfer getFileTransfer(java.lang.String id)
          Retrieve a FileGenerator given the id that it was stored under
 void setDownloadRequestsBeforeRemove(int downloadRequestsBeforeRemove)
          Some download managers cause multiple downloads, so we count the number of downloads before the delete is done.
 
Methods inherited from class org.directwebremoting.impl.PurgingDownloadManager
addFileTransfer, setDownloadHandlerUrl, setIdGenerator, setPurgeDownloadsAfter, setScheduledThreadPoolExecutor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.directwebremoting.extend.DownloadManager
addFileTransfer
 

Constructor Detail

InMemoryDownloadManager

public InMemoryDownloadManager()
Method Detail

getFileTransfer

public FileTransfer getFileTransfer(java.lang.String id)
Description copied from interface: DownloadManager
Retrieve a FileGenerator given the id that it was stored under

Specified by:
getFileTransfer in interface DownloadManager
Parameters:
id - The id to lookup
Returns:
The matching FileGenerator or null if no match was found

setDownloadRequestsBeforeRemove

public void setDownloadRequestsBeforeRemove(int downloadRequestsBeforeRemove)
Some download managers cause multiple downloads, so we count the number of downloads before the delete is done.


Copyright 2008