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
Makes sure that the
routes are properly registered, and that
MockQuarkusServletService is used instead of vanilla
QuarkusVaadinServletService.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final jakarta.enterprise.inject.spi.BeanManagerThe CDI bean manager.protected final com.vaadin.browserless.internal.RoutesConfiguration object of all routes and error routes for test.protected final com.vaadin.browserless.internal.UIFactoryFactory used to build Flow UIs.Fields inherited from class com.vaadin.flow.server.VaadinServlet
INTERNAL_VAADIN_SERVLET_VITE_DEV_MODE_FRONTEND_PATHFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
ConstructorsConstructorDescriptionMockQuarkusServlet(com.vaadin.browserless.internal.Routes routes, jakarta.enterprise.inject.spi.BeanManager beanManager, @NotNull com.vaadin.browserless.internal.UIFactory uiFactory) Creates aQuarkusVaadinServletfor testing environment. -
Method Summary
Modifier and TypeMethodDescriptionprotected DeploymentConfigurationCreates a deployment configuration to be used for the creation of aVaadinService.protected VaadinServletServicecreateServletService(DeploymentConfiguration deploymentConfiguration) Creates a vaadin servlet service.Methods inherited from class com.vaadin.quarkus.QuarkusVaadinServlet
destroy, getCurrentServletName, init, serviceMethods inherited from class com.vaadin.flow.server.VaadinServlet
createDeploymentConfiguration, createServletService, createStaticFileHandler, createVaadinRequest, getCurrent, getFrontendMapping, getLastPathParameter, getService, getServletConfig, handleContextOrServletRootWithoutSlash, serveStaticOrWebJarRequest, servletInitialized, whenFrontendMappingAvailableMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
routes
protected final com.vaadin.browserless.internal.Routes routesConfiguration object of all routes and error routes for test. -
uiFactory
protected final transient com.vaadin.browserless.internal.UIFactory uiFactoryFactory used to build Flow UIs. -
beanManager
protected final transient jakarta.enterprise.inject.spi.BeanManager beanManagerThe 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 aQuarkusVaadinServletfor testing environment.- Parameters:
routes- routes available for testing.beanManager- the CDI bean manageruiFactory- the factory used to build Flow UIs.
-
-
Method Details
-
createDeploymentConfiguration
protected DeploymentConfiguration createDeploymentConfiguration() throws jakarta.servlet.ServletExceptionDescription copied from class:VaadinServletCreates a deployment configuration to be used for the creation of aVaadinService. Intended to be used by dependency injection frameworks.- Overrides:
createDeploymentConfigurationin classVaadinServlet- Returns:
- the created deployment configuration
- Throws:
jakarta.servlet.ServletException- if creating the deployment configuration fails
-
createServletService
protected VaadinServletService createServletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException Description copied from class:VaadinServletCreates a vaadin servlet service.- Overrides:
createServletServicein classQuarkusVaadinServlet- Parameters:
deploymentConfiguration- the deployment configuration to be used- Returns:
- the created vaadin servlet service
- Throws:
ServiceException- if creating the vaadin servlet service fails
-