biz.hammurapi.web
Class SelfDispatchingServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bybiz.hammurapi.web.StylingServlet
              extended bybiz.hammurapi.web.DispatchingServlet
                  extended bybiz.hammurapi.web.SelfDispatchingServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SelfDispatchingServlet
extends DispatchingServlet

Dispatches requests to own methods. Methods must be declared in subclasses of this class to avoid infinite loops.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class biz.hammurapi.web.StylingServlet
StylingServlet.TransformCommand
 
Field Summary
 
Fields inherited from class biz.hammurapi.web.StylingServlet
parameterizer
 
Constructor Summary
SelfDispatchingServlet()
           
 
Method Summary
protected  java.lang.Object getActionInstance(java.lang.String path)
          Extracts instance name from the path and returns instance for the path.
protected  java.lang.String getActionName(java.lang.String path)
           
protected  int styleSeparatorPosition()
           
protected  void verifyMethod(java.lang.reflect.Method method)
          Subclasses can override this method and throw an exception of methods which are not supposed to be dispatched to.
 
Methods inherited from class biz.hammurapi.web.DispatchingServlet
doGet, doPost, executeAction, getDomSerializer, init, processRequest, style, style
 
Methods inherited from class biz.hammurapi.web.StylingServlet
getSetParametersCallback, getTransformer, newDocumentBuilder
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, 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

SelfDispatchingServlet

public SelfDispatchingServlet()
Method Detail

getActionInstance

protected java.lang.Object getActionInstance(java.lang.String path)
                                      throws HammurapiWebException
Extracts instance name from the path and returns instance for the path.

Specified by:
getActionInstance in class DispatchingServlet
Returns:
Object to invoke action methods
Throws:
HammurapiWebException

getActionName

protected java.lang.String getActionName(java.lang.String path)
                                  throws HammurapiWebException
Specified by:
getActionName in class DispatchingServlet
Parameters:
path -
Returns:
Action method name
Throws:
HammurapiWebException

styleSeparatorPosition

protected int styleSeparatorPosition()
Specified by:
styleSeparatorPosition in class DispatchingServlet
Returns:
Position of "/" in the servlet path info which separates action name from style info.

verifyMethod

protected void verifyMethod(java.lang.reflect.Method method)
                     throws HammurapiWebException
Description copied from class: DispatchingServlet
Subclasses can override this method and throw an exception of methods which are not supposed to be dispatched to.

Overrides:
verifyMethod in class DispatchingServlet
Parameters:
method -
Throws:
HammurapiWebException


Copyright © 2006 Hammurapi Group. All Rights Reserved.