org.apache.axis2.transport.http
Class AbstractAgent

java.lang.Object
  extended by org.apache.axis2.transport.http.AbstractAgent
Direct Known Subclasses:
AdminAgent, ListingAgent

public class AbstractAgent
extends Object

The AbstractAgent acts as a simple dispatcher for http requests. It delegates incoming requests to processXyz methods while Xyz is the part of the request uri past last /.


Field Summary
protected  ConfigurationContext configContext
           
protected static String DEFAULT_INDEX_JSP
           
protected  Map operationCache
           
 
Constructor Summary
AbstractAgent(ConfigurationContext aConfigContext)
           
 
Method Summary
 void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
           
protected  void populateSessionInformation(HttpServletRequest req)
           
protected  void processIndex(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
          Callback method for index page.
protected  void processUnknown(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
          Callback method for unknown/unsupported requests.
protected  void renderView(String jspName, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INDEX_JSP

protected static final String DEFAULT_INDEX_JSP
See Also:
Constant Field Values

operationCache

protected transient Map operationCache

configContext

protected transient ConfigurationContext configContext
Constructor Detail

AbstractAgent

public AbstractAgent(ConfigurationContext aConfigContext)
Method Detail

handle

public void handle(HttpServletRequest httpServletRequest,
                   HttpServletResponse httpServletResponse)
            throws IOException,
                   ServletException
Throws:
IOException
ServletException

processIndex

protected void processIndex(HttpServletRequest httpServletRequest,
                            HttpServletResponse httpServletResponse)
                     throws IOException,
                            ServletException
Callback method for index page. Forwards to DEFAULT_INDEX_JSP by default.

Parameters:
httpServletRequest - The incoming request.
httpServletResponse - The outgoing response.
Throws:
IOException
ServletException

processUnknown

protected void processUnknown(HttpServletRequest httpServletRequest,
                              HttpServletResponse httpServletResponse)
                       throws IOException,
                              ServletException
Callback method for unknown/unsupported requests. Returns HTTP Status 404 by default.

Parameters:
httpServletRequest - The incoming request.
httpServletResponse - The outgoing response.
Throws:
IOException
ServletException

renderView

protected void renderView(String jspName,
                          HttpServletRequest httpServletRequest,
                          HttpServletResponse httpServletResponse)
                   throws IOException,
                          ServletException
Throws:
IOException
ServletException

populateSessionInformation

protected void populateSessionInformation(HttpServletRequest req)


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.