Class BaseXServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    Direct Known Subclasses:
    RESTServlet, RestXqServlet, WebDAVServlet

    public abstract class BaseXServlet
    extends javax.servlet.http.HttpServlet
    Base class for various servlets.
    Author:
    BaseX Team 2005-23, BSD License, Christian Gruen
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseXServlet()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void init​(javax.servlet.ServletConfig config)  
      protected abstract void run​(HTTPConnection conn)
      Runs the code.
      void service​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • Constructor Detail

      • BaseXServlet

        public BaseXServlet()
    • Method Detail

      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • service

        public final void service​(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws IOException
        Overrides:
        service in class javax.servlet.http.HttpServlet
        Throws:
        IOException
      • run

        protected abstract void run​(HTTPConnection conn)
                             throws Exception
        Runs the code.
        Parameters:
        conn - HTTP connection
        Throws:
        Exception - any exception