Class CdiVaadinServletService

java.lang.Object
com.vaadin.flow.server.VaadinService
com.vaadin.flow.server.VaadinServletService
com.vaadin.cdi.CdiVaadinServletService
All Implemented Interfaces:
Serializable

public class CdiVaadinServletService extends com.vaadin.flow.server.VaadinServletService
Servlet service implementation for Vaadin CDI.

This class creates and initializes a @VaadinServiceEnabled Instantiator.

Some @VaadinServiceEnabled beans can be used to customize Vaadin, they are also created, and bound if found.

  • SystemMessagesProvider is bound to service by VaadinService.setSystemMessagesProvider(SystemMessagesProvider).
  • ErrorHandler is bound to created sessions by VaadinSession.setErrorHandler(ErrorHandler).
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    This class implements the actual instantiation and event brokering functionality of CdiVaadinServletService.
  • Field Summary

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

    ATMOSPHERE_MISSING_ERROR, INVALID_ATMOSPHERE_VERSION_WARNING
  • Constructor Summary

    Constructors
    Constructor
    Description
    CdiVaadinServletService(CdiVaadinServlet servlet, com.vaadin.flow.function.DeploymentConfiguration configuration, jakarta.enterprise.inject.spi.BeanManager beanManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Executor
     
    void
    fireUIInitListeners(com.vaadin.flow.component.UI ui)
     
     
    void
     
    Optional<com.vaadin.flow.di.Instantiator>
     
    protected com.vaadin.flow.server.VaadinSession
    loadSession(com.vaadin.flow.server.WrappedSession wrappedSession)
     
    protected void
    storeSession(com.vaadin.flow.server.VaadinSession session, com.vaadin.flow.server.WrappedSession wrappedSession)
     

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

    constructVaadinContext, createRequestHandlers, getContextRootRelativePath, getCurrentResponse, getCurrentServletRequest, getMainDivId, getMimeType, getPwaRegistry, getResource, getResourceAsStream, getResourceInServletContext, getRouteRegistry, getServiceName, getStaticResource, requestCanCreateSession, resolveResource, setDefaultClassLoader

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

    accessSession, addServiceDestroyListener, addSessionDestroyListener, addSessionInitListener, addUIInitListener, closeSession, createCriticalNotificationJSON, createCriticalNotificationJSON, createDefaultObjectMapper, createInstantiator, createSessionExpiredJSON, createUINotFoundJSON, createVaadinRequestInterceptors, createVaadinSession, destroy, ensureAccessQueuePurged, ensurePushAvailable, findUI, findVaadinSession, fireSessionDestroy, getBootstrapInitialPredicate, getBootstrapUrlPredicate, getClassLoader, getContext, getCsrfTokenAttributeName, getCurrent, getCurrentRequest, getDependencyFilters, getDeploymentConfiguration, getExecutor, getExistingSession, getInstantiator, getRequestHandlers, getRouter, getSessionAttributeName, getSessionLock, getSystemMessages, getSystemMessagesProvider, getVaadinRequestInterceptors, handleRequest, handleSessionExpired, isAtmosphereAvailable, isCsrfTokenValid, isOtherSessionLocked, isResourceAvailable, isUIActive, lockSession, modifyIndexHtmlResponse, readFromHttpSession, reinitializeSession, removeFromHttpSession, removeSession, requestEnd, requestStart, runPendingAccessTasks, setBootstrapInitialPredicate, setBootstrapUrlPredicate, setClassLoader, setCurrent, setCurrentInstances, setSystemMessagesProvider, unlockSession, verifyNoOtherSessionLocked, writeStringResponse, writeToHttpSession, writeUncachedStringResponse

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CdiVaadinServletService

      public CdiVaadinServletService(CdiVaadinServlet servlet, com.vaadin.flow.function.DeploymentConfiguration configuration, jakarta.enterprise.inject.spi.BeanManager beanManager)
  • Method Details

    • init

      public void init() throws com.vaadin.flow.server.ServiceException
      Overrides:
      init in class com.vaadin.flow.server.VaadinService
      Throws:
      com.vaadin.flow.server.ServiceException
    • fireUIInitListeners

      public void fireUIInitListeners(com.vaadin.flow.component.UI ui)
      Overrides:
      fireUIInitListeners in class com.vaadin.flow.server.VaadinService
    • loadSession

      protected com.vaadin.flow.server.VaadinSession loadSession(com.vaadin.flow.server.WrappedSession wrappedSession)
      Overrides:
      loadSession in class com.vaadin.flow.server.VaadinService
    • storeSession

      protected void storeSession(com.vaadin.flow.server.VaadinSession session, com.vaadin.flow.server.WrappedSession wrappedSession)
      Overrides:
      storeSession in class com.vaadin.flow.server.VaadinService
    • createDefaultExecutor

      protected Executor createDefaultExecutor()
      Overrides:
      createDefaultExecutor in class com.vaadin.flow.server.VaadinService
    • loadInstantiators

      public Optional<com.vaadin.flow.di.Instantiator> loadInstantiators() throws com.vaadin.flow.server.ServiceException
      Overrides:
      loadInstantiators in class com.vaadin.flow.server.VaadinService
      Throws:
      com.vaadin.flow.server.ServiceException
    • getServlet

      public CdiVaadinServlet getServlet()
      Overrides:
      getServlet in class com.vaadin.flow.server.VaadinServletService