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
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 com.vaadin.flow.function.DeploymentConfigurationprotected com.vaadin.flow.server.VaadinServletServicecreateServletService(com.vaadin.flow.function.DeploymentConfiguration deploymentConfiguration) 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, doPost, doPut, doTrace, getLastModified, 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 com.vaadin.flow.function.DeploymentConfiguration createDeploymentConfiguration() throws jakarta.servlet.ServletException- Overrides:
createDeploymentConfigurationin classcom.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:
createServletServicein classcom.vaadin.quarkus.QuarkusVaadinServlet- Throws:
com.vaadin.flow.server.ServiceException
-