|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.barracudamvc.core.comp.helper.ComponentGateway
The component gateway is a servlet that provides a very simple interface to the Barracuda component model
Field Summary | |
static String |
HTTP_SERVLET_REQUEST
|
static String |
HTTP_SERVLET_RESPONSE
|
protected static org.apache.log4j.Logger |
logger
|
boolean |
recycleChildren
|
Constructor Summary | |
ComponentGateway()
|
Method Summary | |
protected void |
doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
By default the DELETE request is mapped to the handleDefault method |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
By default the GET request is mapped to the handleDefault method |
protected void |
doOptions(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
By default the OPTIONS request is mapped to the handleDefault method |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
By default the POST request is mapped to the handleDefault method |
protected void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
By default the PUT request is mapped to the handleDefault method |
protected void |
doTrace(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
By default the TRACE request is mapped to the handleDefault method |
DOMWriter |
getDOMWriter()
Get a DOMWriter. |
BlockIterator |
getIterator(String key)
Get a block iterator (optional) |
abstract Document |
handleDefault(BComponent root,
ViewContext vc,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handle the default HttpRequest. |
protected void |
handleDefault(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
handleEventException(EventException e,
ViewContext vc,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handle an EventException. |
void |
handleRenderException(RenderException e,
ViewContext vc,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handle a RenderException. |
Methods inherited from class javax.servlet.http.HttpServlet |
doHead, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.log4j.Logger logger
public boolean recycleChildren
public static final String HTTP_SERVLET_REQUEST
public static final String HTTP_SERVLET_RESPONSE
Constructor Detail |
public ComponentGateway()
Method Detail |
public abstract Document handleDefault(BComponent root, ViewContext vc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException, RenderException, EventException
Handle the default HttpRequest. This is the method developers will typically override. The developers shaould add any components to the root component and then return the underlying DOM Document (that backs their components) so it can be rendered
root
- the root component which will get rendered as a result
of this requestvc
- the ViewContext object describes what features the
client view is capable of supportingreq
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
RenderException
EventException
public void handleEventException(EventException e, ViewContext vc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
Handle an EventException. Basically, this is where we handle the really bad, unexpected type of event exceptions. Generally, as you code, if you want to interrupt the dispatch and fire a new event, you should throw an InterruptDispatchException. Only throw EventExceptions in truly exceptional circumstances.
e
- the EventException to handlevc
- the ViewContext object describes what features the
client view is capable of supportingreq
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
public void handleRenderException(RenderException e, ViewContext vc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
Handle a RenderException. Basically, this is where we handle the really bad, unexpected type of errors that occur while unexpectedldy rendering the component hierarchy.
e
- the RenderException to handlevc
- the ViewContext object describes what features the
client view is capable of supportingreq
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
public DOMWriter getDOMWriter()
Get a DOMWriter. By default, we use a DefaultDOMWriter. If you'd like to use something else, override this method.
public BlockIterator getIterator(String key)
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
By default the GET request is mapped to the handleDefault method
req
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
By default the POST request is mapped to the handleDefault method
req
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
protected void doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
By default the OPTIONS request is mapped to the handleDefault method
req
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
protected void doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
By default the DELETE request is mapped to the handleDefault method
req
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
protected void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
By default the PUT request is mapped to the handleDefault method
req
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
protected void doTrace(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
By default the TRACE request is mapped to the handleDefault method
req
- the servlet requestresp
- the servlet response
javax.servlet.ServletException
IOException
protected void handleDefault(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |