org.alltimeflashdreamer.filelister
Class FileListerDownloadServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.alltimeflashdreamer.filelister.AbstractFileListerServlet
              extended byorg.alltimeflashdreamer.filelister.FileListerDownloadServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class FileListerDownloadServlet
extends AbstractFileListerServlet

Title: FileListerDownloadServlet

Description: This servlet controls the download-zip-file process, including the generation and the streaming of the zip file and the producing of text output for the client while waiting until the file is created.

Organization: All Time Flash Dreamer

Version:
0.5.1
Author:
Copyright (c) 2002-2004 by Florian Steinsiepe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.alltimeflashdreamer.filelister.AbstractFileListerServlet
CONFIGCLASSNAME
 
Constructor Summary
FileListerDownloadServlet()
           
 
Method Summary
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Reads the download parameter values from the URL (which are just indexes within the FileLister list) and packs the wished/clicked files into a zip which is then sent to the client, together with the right MIME encoding.
 
Methods inherited from class org.alltimeflashdreamer.filelister.AbstractFileListerServlet
doGet, showErrorSite
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileListerDownloadServlet

public FileListerDownloadServlet()
Method Detail

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws IOException
Reads the download parameter values from the URL (which are just indexes within the FileLister list) and packs the wished/clicked files into a zip which is then sent to the client, together with the right MIME encoding. Because the generation of such a zip fail may take quite a while, it's done by the ZipBuilderThread class which is required on a periodic base (the intermediarily shown download site has a meta-refresh tag which always recalls this servlet). As long as the thread hasn't finished, the download site is shown again, and in the end, the zip file is streamed to the client.

Specified by:
doPost in class AbstractFileListerServlet
Parameters:
request - the request object to read URL stuff from
response - the response object to send stuff to
Throws:
IOException - as defined in the superclass