|
||||||||||
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
com.yworks.yfiles.server.tiles.servlet.action.ActionServlet
The action servlet dispatches custom actions to handlers. Custom
actions are implemented by (ActionHandler
) implementations.
Constructor Summary | |
ActionServlet()
|
Method Summary | |
protected ActionContext |
createContext(javax.servlet.http.HttpServletRequest request)
creates a new action context instance from the given request. |
protected ClientControl |
createControl(ActionContext context)
creates a new client control instance from an action context. |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
calls the appropriate action handler for the request and writes the response. |
ActionHandler |
getActionHandler(String id)
returns the action handler registered for the given id. |
ActionHandler |
registerActionHandler(String id,
ActionHandler handler)
registers an action handler instance for an id. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPut, doTrace, 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 |
Constructor Detail |
public ActionServlet()
Method Detail |
public ActionHandler registerActionHandler(String id, ActionHandler handler)
id
- a stringhandler
- the handler for requests to the action servlet with the given id
null
getActionHandler(String)
public ActionHandler getActionHandler(String id)
id
- a string
null
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
ActionContext
and a ClientControl
instance are created and
passed to the ActionHandler.handleAction(ActionContext, ClientControl)
method of the action handler. If a runtime exception occurs during the execution
of the handler the response state is set to 500. If the action handler succeeds
a response is written to the client which contains the information as configured
in the client control.
request
- the request from a clientresponse
- the response to be sent to the client
IOException
- if I/O problems occur
javax.servlet.ServletException
- if servlet related problems occurprotected ActionContext createContext(javax.servlet.http.HttpServletRequest request)
request
- a client request for the action servlet
protected ClientControl createControl(ActionContext context)
ActionHandler.handleAction(ActionContext, ClientControl)
method.
context
- the action context for an action servlet request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |