org.activemath.webapp.ws
Class XmlRpcServiceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.activemath.webapp.ws.XmlRpcServiceServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class XmlRpcServiceServlet
extends HttpServlet

A simple servlet that attaches handlers to (exact) sub-paths. It can consider the handler as a resource and return a representation of it, maybe using .

See Also:
XmlRpcServer}, Serialized Form

Constructor Summary
XmlRpcServiceServlet()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Uses the registred handler at the given path expecting it to implement the interface ResourceHandler whose method is called to provide the expected representation.
 void doHead(HttpServletRequest request, HttpServletResponse response)
          The HEAD method is used to poll the state-changes, currently only returns the Last-Modified HTTP header.
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Lets the XmlRpcServer attached to the handler at this path call the handler.
 void init()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcServiceServlet

public XmlRpcServiceServlet()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class GenericServlet
Throws:
ServletException

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   IOException
Lets the XmlRpcServer attached to the handler at this path call the handler.

Overrides:
doPost in class HttpServlet
Parameters:
request -
response -
Throws:
ServletException
IOException

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  IOException
Uses the registred handler at the given path expecting it to implement the interface ResourceHandler whose method is called to provide the expected representation. If not, the Object.toString()method is used to return a representation of type text/plain.

Overrides:
doGet in class HttpServlet
Parameters:
request -
response -
Throws:
ServletException
IOException

doHead

public void doHead(HttpServletRequest request,
                   HttpServletResponse response)
The HEAD method is used to poll the state-changes, currently only returns the Last-Modified HTTP header.

Overrides:
doHead in class HttpServlet
Parameters:
request -
response -