Class BaseXServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.basex.http.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-21, BSD License, Christian Gruen
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    init(javax.servlet.ServletConfig config)
     
    protected abstract void
    Runs the code.
    final 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseXServlet

      public BaseXServlet()
  • Method Details

    • 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