Class MockQuarkusServlet

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

public class MockQuarkusServlet extends com.vaadin.quarkus.QuarkusVaadinServlet
Makes sure that the routes are properly registered, and that MockQuarkusServletService is used instead of vanilla QuarkusVaadinServletService.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final jakarta.enterprise.inject.spi.BeanManager
    The CDI bean manager.
    protected final com.vaadin.browserless.internal.Routes
    Configuration object of all routes and error routes for test.
    protected final com.vaadin.browserless.internal.UIFactory
    Factory used to build Flow UIs.

    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
    MockQuarkusServlet(com.vaadin.browserless.internal.Routes routes, jakarta.enterprise.inject.spi.BeanManager beanManager, @NotNull com.vaadin.browserless.internal.UIFactory uiFactory)
    Creates a QuarkusVaadinServlet for testing environment.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.vaadin.flow.function.DeploymentConfiguration
     
    protected com.vaadin.flow.server.VaadinServletService
    createServletService(com.vaadin.flow.function.DeploymentConfiguration deploymentConfiguration)
     

    Methods inherited from class com.vaadin.quarkus.QuarkusVaadinServlet

    destroy, getCurrentServletName, init, service

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

    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, doPost, doPut, doTrace, getLastModified, 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
  • Field Details

    • routes

      protected final com.vaadin.browserless.internal.Routes routes
      Configuration object of all routes and error routes for test.
    • uiFactory

      protected final transient com.vaadin.browserless.internal.UIFactory uiFactory
      Factory used to build Flow UIs.
    • beanManager

      protected final transient jakarta.enterprise.inject.spi.BeanManager beanManager
      The CDI bean manager.
  • Constructor Details

    • MockQuarkusServlet

      public MockQuarkusServlet(com.vaadin.browserless.internal.Routes routes, jakarta.enterprise.inject.spi.BeanManager beanManager, @NotNull @NotNull com.vaadin.browserless.internal.UIFactory uiFactory)
      Creates a QuarkusVaadinServlet for testing environment.
      Parameters:
      routes - routes available for testing.
      beanManager - the CDI bean manager
      uiFactory - the factory used to build Flow UIs.
  • Method Details

    • createDeploymentConfiguration

      protected com.vaadin.flow.function.DeploymentConfiguration createDeploymentConfiguration() throws jakarta.servlet.ServletException
      Overrides:
      createDeploymentConfiguration in class com.vaadin.flow.server.VaadinServlet
      Throws:
      jakarta.servlet.ServletException
    • createServletService

      protected com.vaadin.flow.server.VaadinServletService createServletService(com.vaadin.flow.function.DeploymentConfiguration deploymentConfiguration) throws com.vaadin.flow.server.ServiceException
      Overrides:
      createServletService in class com.vaadin.quarkus.QuarkusVaadinServlet
      Throws:
      com.vaadin.flow.server.ServiceException