biz.hammurapi.web
Class SelfDispatchingServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
biz.hammurapi.web.StylingServlet
biz.hammurapi.web.DispatchingServlet
biz.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
|
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 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 |
SelfDispatchingServlet
public SelfDispatchingServlet()
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.