pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.service
Class Servlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.torweg.pulse.service.Servlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Servlet
extends javax.servlet.http.HttpServlet

The controller servlet of the pulse container.

The Servlet controls the actual processing of an HTTP request sent to the pulse container.

  1. Parses the HttpServletRequest into a ServiceRequest
  2. Checks the If-None-Match header, if a 304 Not Modified response can be sent
  3. Invokes all Bundles according to the current Command ( ServiceRequest.getCommand(), Invoker.execute(ServiceRequest, ResultSet) ) and collects the results
  4. Processes all Events collected by the EventManager during bundle invocation ( ServiceRequest.getEventManager() )
  5. Generates the output via XSLT, if the EventManager does not contain an output event

Version:
$Revision: 1871 $
Author:
Thomas Weber
See Also:
Serialized Form

Constructor Summary
Servlet()
           
 
Method Summary
 void destroy()
          executes shutdown tasks.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          captures HTTP requests sent via GET.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          captures HTTP requests sent via POST.
 void init()
          initialises the servlet's basic fields and starts up core components.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
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

Servlet

public Servlet()
Method Detail

init

public final void init()
                throws javax.servlet.ServletException
initialises the servlet's basic fields and starts up core components.

Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException - on errors during the start up process

destroy

public final void destroy()
executes shutdown tasks.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

doPost

public final void doPost(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws java.io.IOException
captures HTTP requests sent via POST.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - the HTTP request sent to the servlet
response - the HTTP response returned by the servlet
Throws:
java.io.IOException - on errors while writing to the response

doGet

public final void doGet(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.io.IOException
captures HTTP requests sent via GET.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - the HTTP request sent to the servlet
response - the HTTP response returned by the servlet
Throws:
java.io.IOException - on errors while writing to the response