org.apache.cocoon.servletservice
Class CallStackHelper

java.lang.Object
  extended byorg.apache.cocoon.servletservice.CallStackHelper

public class CallStackHelper
extends Object

Helper class used for geting hold on the current servlet service

Since:
2.2
Version:
$Id: CallStackHelper.java 562806 2007-08-05 02:26:41Z vgritsenko $

Field Summary
static String SUPER_CALL
          Key for a value determing wether a call frame contains a super call or not
 
Constructor Summary
CallStackHelper()
           
 
Method Summary
static void enterServlet(ServletContext context, HttpServletRequest request, HttpServletResponse response)
          This hook must be called each time a servlet service is entered.
static void enterSuperServlet(ServletContext context, HttpServletRequest request, HttpServletResponse response)
          This hook must be called each time a super servlet service is entered.
static ServletContext getBaseServletContext()
          Use this method for getting the context that should be used for resolving a polymorphic servlet protocol call
static ServletContext getCurrentServletContext()
          Use this method for getting the context that should be used for resolving a servlet protocol call to a super servlet service
static void leaveServlet()
          This hook must be called each time a servlet service is left.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPER_CALL

public static final String SUPER_CALL
Key for a value determing wether a call frame contains a super call or not

See Also:
Constant Field Values
Constructor Detail

CallStackHelper

public CallStackHelper()
Method Detail

enterServlet

public static void enterServlet(ServletContext context,
                                HttpServletRequest request,
                                HttpServletResponse response)
                         throws ServletException
This hook must be called each time a servlet service is entered.

This method should never raise an exception, except when the parameters are not set!

Throws:
ServletException - if at least one of the parameters is null

enterSuperServlet

public static void enterSuperServlet(ServletContext context,
                                     HttpServletRequest request,
                                     HttpServletResponse response)
                              throws ServletException
This hook must be called each time a super servlet service is entered.

This method should never raise an exception, except when the parameters are not set!

Throws:
ServletException - if at least one of the parameters is null

leaveServlet

public static void leaveServlet()
This hook must be called each time a servlet service is left.

It's the counterpart to the enterServlet(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) method.


getBaseServletContext

public static ServletContext getBaseServletContext()
Use this method for getting the context that should be used for resolving a polymorphic servlet protocol call

Returns:
a servlet context

getCurrentServletContext

public static ServletContext getCurrentServletContext()
Use this method for getting the context that should be used for resolving a servlet protocol call to a super servlet service

Returns:
a servlet context


Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.