net.anotheria.moskitodemo.servlet
Class SimpleServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by net.anotheria.moskito.web.MoskitoHttpServlet
              extended by net.anotheria.moskitodemo.servlet.SimpleServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, IStatsProducer

public class SimpleServlet
extends MoskitoHttpServlet

This is a simple example how to use moskito in a servlet. Basically it provides all the functionality the simple service notificationprovider over web.

Author:
another
See Also:
Serialized Form

Field Summary
static int MODE_ERROR
           
static int MODE_NORMAL_PROCESSING
           
static int MODE_RANDOM
           
 
Fields inherited from interface net.anotheria.moskito.core.producers.IStatsProducer
SUBSYSTEM_BUILTIN
 
Constructor Summary
SimpleServlet()
           
 
Method Summary
 void init()
           
protected  void moskitoDoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void moskitoShowStats(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  boolean useShortStatList()
           
 
Methods inherited from class net.anotheria.moskito.web.MoskitoHttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getCategory, getLastModified, getMonitoringIntervals, getProducerId, getStats, getSubsystem, init, moskitoDoDelete, moskitoDoHead, moskitoDoOptions, moskitoDoPost, moskitoDoPut, moskitoDoTrace, moskitoGetLastModified
 
Methods inherited from class javax.servlet.http.HttpServlet
service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_NORMAL_PROCESSING

public static final int MODE_NORMAL_PROCESSING
See Also:
Constant Field Values

MODE_RANDOM

public static final int MODE_RANDOM
See Also:
Constant Field Values

MODE_ERROR

public static final int MODE_ERROR
See Also:
Constant Field Values
Constructor Detail

SimpleServlet

public SimpleServlet()
Method Detail

init

public void init()
Overrides:
init in class javax.servlet.GenericServlet

moskitoDoGet

protected void moskitoDoGet(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)
                     throws javax.servlet.ServletException,
                            IOException
Overrides:
moskitoDoGet in class MoskitoHttpServlet
Throws:
javax.servlet.ServletException
IOException

moskitoShowStats

protected void moskitoShowStats(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res)
                         throws javax.servlet.ServletException,
                                IOException
Throws:
javax.servlet.ServletException
IOException

useShortStatList

protected boolean useShortStatList()
Overrides:
useShortStatList in class MoskitoHttpServlet


Copyright © 2010-2012 anotheria.net. All Rights Reserved.