Class QuarkusVaadinServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.vaadin.flow.server.VaadinServlet
com.vaadin.quarkus.QuarkusVaadinServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class QuarkusVaadinServlet extends com.vaadin.flow.server.VaadinServlet
Servlet to create QuarkusVaadinServletService. An instance of this servlet is automatically registered if no other custom VaadinServlet class with Servlet 3.0 annotations is present on classpath. A subclass of this servlet can be to provide a customized QuarkusVaadinServletService implementation, in which case createServletService(DeploymentConfiguration) must call service.init().
See Also:
  • Field Summary

    Fields inherited from class com.vaadin.flow.server.VaadinServlet

    INTERNAL_VAADIN_SERVLET_VITE_DEV_MODE_FRONTEND_PATH

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.vaadin.flow.server.VaadinServletService
    createServletService(com.vaadin.flow.function.DeploymentConfiguration configuration)
     
    void
     
    Name of the Vaadin servlet for the current thread.
    void
    init(jakarta.servlet.ServletConfig servletConfig)
     
    protected void
    service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
     

    Methods inherited from class com.vaadin.flow.server.VaadinServlet

    createDeploymentConfiguration, createDeploymentConfiguration, createServletService, createStaticFileHandler, createVaadinRequest, getCurrent, getFrontendMapping, getLastPathParameter, getService, getServletConfig, handleContextOrServletRootWithoutSlash, serveStaticOrWebJarRequest, servletInitialized, whenFrontendMappingAvailable

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doGet, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, service

    Methods inherited from class jakarta.servlet.GenericServlet

    getInitParameter, getInitParameterNames, 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

    • QuarkusVaadinServlet

      public QuarkusVaadinServlet()
  • Method Details

    • createServletService

      protected com.vaadin.flow.server.VaadinServletService createServletService(com.vaadin.flow.function.DeploymentConfiguration configuration) throws com.vaadin.flow.server.ServiceException
      Overrides:
      createServletService in class com.vaadin.flow.server.VaadinServlet
      Throws:
      com.vaadin.flow.server.ServiceException
    • init

      public void init(jakarta.servlet.ServletConfig servletConfig) throws jakarta.servlet.ServletException
      Specified by:
      init in interface jakarta.servlet.Servlet
      Overrides:
      init in class com.vaadin.flow.server.VaadinServlet
      Throws:
      jakarta.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface jakarta.servlet.Servlet
      Overrides:
      destroy in class com.vaadin.flow.server.VaadinServlet
    • service

      protected void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Overrides:
      service in class com.vaadin.flow.server.VaadinServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
    • getCurrentServletName

      public static Optional<String> getCurrentServletName()
      Name of the Vaadin servlet for the current thread.

      Until VaadinService appears in CurrentInstance, it have to be used to get the servlet name.

      This method is meant for internal use only.

      Returns:
      currently processing vaadin servlet name
      See Also:
      • VaadinServlet.getCurrent()