org.matalon.pagerankhits.servlet
Class AbstractServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.matalon.pagerankhits.servlet.AbstractServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
CrawlerControlServlet, DisplayMatrixServlet, GetRoutineServlet, ShowCrawlingProgressServlet

public abstract class AbstractServlet
extends javax.servlet.http.HttpServlet

This class acts as an abstract base for all servlets in the program.

Author:
Yonatan Matalon
See Also:
Serialized Form

Field Summary
static java.lang.String PARAM_NAME_STATUS
           
static java.lang.String PARAM_VALUE_STATUS_ERROR
           
static java.lang.String PARAM_VALUE_STATUS_IDLE
           
static java.lang.String PARAM_VALUE_STATUS_RUNNING
           
static java.lang.String PARAM_VALUE_STATUS_SUCCESS
           
static long RECENTLY_MODIFIED_INTERVAL
           
private static long serialVersionUID
           
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
AbstractServlet()
           
 
Method Summary
protected static void printErrorMessage(java.io.PrintWriter printWriter, int callingPageNo, java.lang.String errorMsg)
          Prints an error message.
private static void printHtmlFooter(java.io.PrintWriter printWriter)
          Prints a HTML footer.
private static void printHtmlHeader(java.io.PrintWriter printWriter, int callingPageNo, java.lang.String status, boolean autoRefreshPage)
          Prints a HTML header.
protected static void printStandByMessage(java.io.PrintWriter printWriter, int callingPageNo, long interval)
          Prints a stand-by message.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, 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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

PARAM_NAME_STATUS

public static final java.lang.String PARAM_NAME_STATUS
See Also:
Constant Field Values

PARAM_VALUE_STATUS_IDLE

public static final java.lang.String PARAM_VALUE_STATUS_IDLE
See Also:
Constant Field Values

PARAM_VALUE_STATUS_RUNNING

public static final java.lang.String PARAM_VALUE_STATUS_RUNNING
See Also:
Constant Field Values

PARAM_VALUE_STATUS_ERROR

public static final java.lang.String PARAM_VALUE_STATUS_ERROR
See Also:
Constant Field Values

PARAM_VALUE_STATUS_SUCCESS

public static final java.lang.String PARAM_VALUE_STATUS_SUCCESS
See Also:
Constant Field Values

RECENTLY_MODIFIED_INTERVAL

public static final long RECENTLY_MODIFIED_INTERVAL
See Also:
Constant Field Values
Constructor Detail

AbstractServlet

public AbstractServlet()
Method Detail

printStandByMessage

protected static void printStandByMessage(java.io.PrintWriter printWriter,
                                          int callingPageNo,
                                          long interval)
                                   throws java.io.IOException
Prints a stand-by message.

Parameters:
printWriter -
callingPageNo -
interval -
Throws:
java.io.IOException

printErrorMessage

protected static void printErrorMessage(java.io.PrintWriter printWriter,
                                        int callingPageNo,
                                        java.lang.String errorMsg)
                                 throws java.io.IOException
Prints an error message.

Parameters:
printWriter -
callingPageNo -
errorMsg -
Throws:
java.io.IOException

printHtmlHeader

private static void printHtmlHeader(java.io.PrintWriter printWriter,
                                    int callingPageNo,
                                    java.lang.String status,
                                    boolean autoRefreshPage)
Prints a HTML header.

Parameters:
printWriter -
callingPageNo -
status -
autoRefreshPage -

printHtmlFooter

private static void printHtmlFooter(java.io.PrintWriter printWriter)
Prints a HTML footer.

Parameters:
printWriter -