Class RestDocsServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class RestDocsServlet
    extends javax.servlet.http.HttpServlet
    A bundle activator that registers the REST documentation servlet.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.osgi.framework.BundleContext bundleContext
      The OSGI bundle context
      static String SERVLET_PATH
      The servlet path
    • Constructor Summary

      Constructors 
      Constructor Description
      RestDocsServlet()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doGet​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)  
      static org.opencastproject.util.data.Option<org.opencastproject.util.doc.rest.RestService> findRestAnnotation​(Class<?> endpointClass)
      Try to find the RestService annotation starting at endpointClass.
      void start​(org.osgi.framework.BundleContext bundleContext)  
      void stop​(org.osgi.framework.BundleContext bundleContext)  
      • Methods inherited from class javax.servlet.http.HttpServlet

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

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

      • bundleContext

        protected org.osgi.framework.BundleContext bundleContext
        The OSGI bundle context
    • Constructor Detail

      • RestDocsServlet

        public RestDocsServlet()
    • Method Detail

      • start

        public void start​(org.osgi.framework.BundleContext bundleContext)
                   throws Exception
        Throws:
        Exception
      • stop

        public void stop​(org.osgi.framework.BundleContext bundleContext)
                  throws Exception
        Throws:
        Exception
      • doGet

        protected void doGet​(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse resp)
                      throws javax.servlet.ServletException,
                             IOException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • findRestAnnotation

        public static org.opencastproject.util.data.Option<org.opencastproject.util.doc.rest.RestService> findRestAnnotation​(Class<?> endpointClass)
        Try to find the RestService annotation starting at endpointClass.