com.timeindexing.servlet
Class SelectServlet

java.lang.Object
  extended byHttpServlet
      extended bycom.timeindexing.servlet.SelectServlet
Direct Known Subclasses:
FlashStreamDownloadServlet, MP3DownloadServlet, MP3StreamServlet, OctetStreamDownloadServlet, SecurityCodeServlet

public class SelectServlet
extends HttpServlet

This servlet selects data from an index. Data is specified for an index, given a start time and an end time.

If an error occurs when checking the servlet setup or in the arguments are incorrect the response goes through various jsp files. The following values are currently defined as web.xml context-params, shown here with their default values.

param-nameparam-value
norepositorypage/error/no_repository.jsp
noindexspecifiedpage/error/no_index.jsp
nosecuritycodepage/error/no_code.jsp
badsecuritycodepage/error/bad_code.jsp
selectexceptionpage//error/select_exception.jsp

If an excpetion occurs, the exception is placed in the request attribute "exception".
The response is presented through /error/select_exception.jsp.

See Also:
Serialized Form

Nested Class Summary
 class SelectServlet.WriterOutputStream
          Wrap a Writer as an Output Stream.
 
Constructor Summary
SelectServlet()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
           
protected  void doPlayBack(HttpServletRequest request, HttpServletResponse response)
          Playback the data.
protected  boolean empty(java.lang.String name)
          Is a value empty.
protected  boolean isBrowser(HttpServletRequest request)
          Is the client a browser.
protected  boolean isSecurityCodeOn()
          Is security on.
protected  void postPlaybackError(HttpServletRequest request, HttpServletResponse response)
          This is called if there is an error during to playback.
protected  void prePlaybackError(HttpServletRequest request, HttpServletResponse response)
          This is called if there is an error prior to playback.
protected  void setContentType()
          Set the content type.
protected  void setContentType(java.lang.String mimeType)
          Set the content type.
protected  void setFilename()
          Set the filename for downloads.
protected  void setFilename(java.lang.String filename)
          Set the filename for downloads.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectServlet

public SelectServlet()
Method Detail

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws java.io.IOException,
                  ServletException
Throws:
java.io.IOException
ServletException

doPlayBack

protected void doPlayBack(HttpServletRequest request,
                          HttpServletResponse response)
                   throws java.io.IOException
Playback the data.

Throws:
java.io.IOException

prePlaybackError

protected void prePlaybackError(HttpServletRequest request,
                                HttpServletResponse response)
                         throws java.io.IOException
This is called if there is an error prior to playback.

Throws:
java.io.IOException

postPlaybackError

protected void postPlaybackError(HttpServletRequest request,
                                 HttpServletResponse response)
                          throws java.io.IOException
This is called if there is an error during to playback.

Throws:
java.io.IOException

empty

protected boolean empty(java.lang.String name)
Is a value empty.


isBrowser

protected boolean isBrowser(HttpServletRequest request)
Is the client a browser.


isSecurityCodeOn

protected boolean isSecurityCodeOn()
Is security on.


setContentType

protected void setContentType()
Set the content type.


setContentType

protected void setContentType(java.lang.String mimeType)
Set the content type.


setFilename

protected void setFilename()
Set the filename for downloads.


setFilename

protected void setFilename(java.lang.String filename)
Set the filename for downloads.