Package org.apache.axis2.transport.http
Class AbstractAgent
- java.lang.Object
-
- org.apache.axis2.transport.http.AbstractAgent
-
- Direct Known Subclasses:
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
Fields Modifier and Type Field Description protected ConfigurationContext
configContext
protected static String
DEFAULT_INDEX_JSP
protected Map
operationCache
-
Constructor Summary
Constructors Constructor Description AbstractAgent(ConfigurationContext aConfigContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
protected void
populateRequestAttributes(javax.servlet.http.HttpServletRequest req)
protected void
processIndex(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
Callback method for index page.protected void
processUnknown(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
Callback method for unknown/unsupported requests.protected void
renderView(String jspName, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
-
-
-
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(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
processIndex
protected void processIndex(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException
Callback method for index page. Forwards toDEFAULT_INDEX_JSP
by default.- Parameters:
httpServletRequest
- The incoming request.httpServletResponse
- The outgoing response.- Throws:
IOException
javax.servlet.ServletException
-
processUnknown
protected void processUnknown(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException
Callback method for unknown/unsupported requests. Returns HTTP Status 404 by default.- Parameters:
httpServletRequest
- The incoming request.httpServletResponse
- The outgoing response.- Throws:
IOException
javax.servlet.ServletException
-
renderView
protected void renderView(String jspName, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
populateRequestAttributes
protected void populateRequestAttributes(javax.servlet.http.HttpServletRequest req)
-
-