org.directwebremoting.extend
Interface DownloadManager

All Known Implementing Classes:
DataUrlDownloadManager, FileStoreDownloadManager, InMemoryDownloadManager, PurgingDownloadManager

public interface DownloadManager

A DownloadManager allows you to inject files into the system and then retrieve them via a servlet at some later date. Implementations of DownloadManager are responsible for defining a purge policy.

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

Method Summary
 java.lang.String addFileTransfer(FileTransfer transfer)
          Inject a file into the system for later download.
 FileTransfer getFileTransfer(java.lang.String id)
          Retrieve a FileGenerator given the id that it was stored under
 

Method Detail

addFileTransfer

java.lang.String addFileTransfer(FileTransfer transfer)
                                 throws java.io.IOException
Inject a file into the system for later download.

Parameters:
transfer - The representation of the file to inject
Returns:
A URL for how to allow download of this data at a later time
Throws:
java.io.IOException - If there are problems reading from the FileTransfer

getFileTransfer

FileTransfer getFileTransfer(java.lang.String id)
                             throws java.io.IOException
Retrieve a FileGenerator given the id that it was stored under

Parameters:
id - The id to lookup
Returns:
The matching FileGenerator or null if no match was found
Throws:
java.io.IOException

Copyright 2008