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
Direct Known Subclasses:
MockQuarkusServlet

public class QuarkusVaadinServlet extends 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:
  • Constructor Details

    • QuarkusVaadinServlet

      public QuarkusVaadinServlet()
  • Method Details

    • createServletService

      protected VaadinServletService createServletService(DeploymentConfiguration configuration) throws ServiceException
      Description copied from class: VaadinServlet
      Creates a vaadin servlet service.
      Overrides:
      createServletService in class VaadinServlet
      Parameters:
      configuration - the deployment configuration to be used
      Returns:
      the created vaadin servlet service
      Throws:
      ServiceException - if creating the vaadin servlet service fails
    • init

      public void init(jakarta.servlet.ServletConfig servletConfig) throws jakarta.servlet.ServletException
      Description copied from class: VaadinServlet
      Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
      Specified by:
      init in interface jakarta.servlet.Servlet
      Overrides:
      init in class VaadinServlet
      Parameters:
      servletConfig - the object containing the servlet's configuration and initialization parameters
      Throws:
      jakarta.servlet.ServletException - if an exception has occurred that interferes with the servlet's normal operation.
    • destroy

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

      protected void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Description copied from class: VaadinServlet
      Receives standard HTTP requests from the public service method and dispatches them.
      Overrides:
      service in class VaadinServlet
      Parameters:
      request - the object that contains the request the client made of the servlet.
      response - the object that contains the response the servlet returns to the client.
      Throws:
      jakarta.servlet.ServletException - if an input or output error occurs while the servlet is handling the TRACE request.
      IOException - if the request for the TRACE cannot be handled.
    • 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: