com.timeindexing.servlet
Class NewSelectServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.timeindexing.servlet.TimeindexingContextServlet
              extended by com.timeindexing.servlet.NewSelectServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class NewSelectServlet
extends TimeindexingContextServlet

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 in the errorpages.properties file held by the servlet context in the /WEB-INF/classes/ directory. The values are 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 the selectexceptionpage.

See Also:
Serialized Form

Nested Class Summary
 class NewSelectServlet.WriterOutputStream
          Wrap a Writer as an Output Stream.
 
Constructor Summary
NewSelectServlet()
           
 
Method Summary
protected  Selecter allocateSelecter(java.lang.String filename, java.io.OutputStream out)
          allocate a Selecter
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void doPlayBack(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Playback the data.
protected  java.lang.String fileNameGenerator(IndexProperties properties)
          This filename generator, takes the arguments and generates a useful filename.
protected  boolean isSecurityCodeOn()
          Is security on.
protected  void postPlaybackError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This is called if there is an error during to playback.
protected  void prePlaybackError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This is called if there is an error prior to playback.
protected  void setContentType(javax.servlet.http.HttpServletResponse response, IndexProperties properties)
          Set the content type.
protected  void setContentType(java.lang.String mimeType)
          Set the content type.
protected  void setFilename(javax.servlet.http.HttpServletResponse response, IndexProperties properties)
          Set the filename for downloads.
protected  void setFilename(java.lang.String filename)
          Set the filename for downloads.
 
Methods inherited from class com.timeindexing.servlet.TimeindexingContextServlet
checkErrorPages, empty, init, initError, isBrowser
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewSelectServlet

public NewSelectServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
javax.servlet.ServletException

doPlayBack

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

Throws:
java.io.IOException

prePlaybackError

protected void prePlaybackError(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.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(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws java.io.IOException
This is called if there is an error during to playback.

Throws:
java.io.IOException

isSecurityCodeOn

protected boolean isSecurityCodeOn()
Is security on.


allocateSelecter

protected Selecter allocateSelecter(java.lang.String filename,
                                    java.io.OutputStream out)
allocate a Selecter


setContentType

protected void setContentType(javax.servlet.http.HttpServletResponse response,
                              IndexProperties properties)
Set the content type.


setContentType

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


setFilename

protected void setFilename(javax.servlet.http.HttpServletResponse response,
                           IndexProperties properties)
Set the filename for downloads.


setFilename

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


fileNameGenerator

protected java.lang.String fileNameGenerator(IndexProperties properties)
This filename generator, takes the arguments and generates a useful filename. Returns filename-0:10-to-1:23.



Timeindexing 2008