no.feide.moria.servlet
Class StatisticsServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by no.feide.moria.servlet.MoriaServlet
              extended by no.feide.moria.servlet.StatisticsServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class StatisticsServlet
extends MoriaServlet

The StatisticsServlet shows the usage of Moria.

Version:
$Revision: 1.8 $
See Also:
Serialized Form

Field Summary
private  no.feide.moria.log.MessageLogger log
          Used for logging.
private static java.lang.String[] REQUIRED_PARAMETERS
          List of parameters required by StatusServlet.
 
Constructor Summary
StatisticsServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the GET requests.
private  java.util.Properties getConfig()
          Get this servlet's configuration from the web module, given by RequestUtil.PROP_CONFIG.
static java.lang.String[] getRequiredParameters()
           
private  void printOldStatistics(java.io.PrintWriter out, java.util.ResourceBundle bundle)
           
private  void printStatistics(java.io.PrintWriter out, java.util.ResourceBundle bundle, java.lang.String filename)
           
 
Methods inherited from class no.feide.moria.servlet.MoriaServlet
getServletConfig
 
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, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final no.feide.moria.log.MessageLogger log
Used for logging.


REQUIRED_PARAMETERS

private static final java.lang.String[] REQUIRED_PARAMETERS
List of parameters required by StatusServlet.

Current required parameters are:

See Also:
RequestUtil.PROP_BACKENDSTATUS_STATISTICS_XML
Constructor Detail

StatisticsServlet

public StatisticsServlet()
Method Detail

getRequiredParameters

public static java.lang.String[] getRequiredParameters()
Returns:
the required parameters for this servlet.

doGet

public final void doGet(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.io.IOException,
                        javax.servlet.ServletException
Handles the GET requests.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - The HTTP request object.
response - The HTTP response object.
Throws:
java.io.IOException - If an input or output error is detected when the servlet handles the GET request.
javax.servlet.ServletException - If the request for the GET could not be handled.
See Also:
HttpServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

printOldStatistics

private void printOldStatistics(java.io.PrintWriter out,
                                java.util.ResourceBundle bundle)

printStatistics

private void printStatistics(java.io.PrintWriter out,
                             java.util.ResourceBundle bundle,
                             java.lang.String filename)

getConfig

private java.util.Properties getConfig()
Get this servlet's configuration from the web module, given by RequestUtil.PROP_CONFIG.

Returns:
The last valid configuration.
Throws:
java.lang.IllegalStateException - If unable to read the current configuration from the servlet context, and there is no previous configuration. Also thrown if any of the required parameters (given by REQUIRED_PARAMETERS) are not set.
See Also:
REQUIRED_PARAMETERS, RequestUtil.PROP_CONFIG


Copyright © 2001-2006 UNINETT FAS. All Rights Reserved.