Class MockSpringServletService

All Implemented Interfaces:
Serializable

public class MockSpringServletService extends SpringVaadinServletService
A mocking service that performs three very important tasks: The class is intentionally opened, to be extensible in user's library.

For internal use only. May be renamed or removed in a future release.

Since:
1.0
Author:
mavi
See Also:
  • Constructor Details

    • MockSpringServletService

      public MockSpringServletService(@NonNull MockSpringServlet servlet, @NonNull DeploymentConfiguration deploymentConfiguration, @NonNull org.springframework.context.ApplicationContext ctx, @NonNull UIFactory uiFactory)
      Creates the service.
      Parameters:
      servlet - the servlet the service belongs to
      deploymentConfiguration - the deployment configuration to use
      ctx - the Spring context the views are instantiated from
      uiFactory - creates the UI of the session that replaces a closed session
  • Method Details

    • isAtmosphereAvailable

      protected boolean isAtmosphereAvailable()
      Description copied from class: VaadinService
      Checks whether Atmosphere is available for use.
      Overrides:
      isAtmosphereAvailable in class VaadinService
      Returns:
      true if Atmosphere is available, false otherwise
    • getMainDivId

      public String getMainDivId(VaadinSession session, VaadinRequest request)
      Description copied from class: VaadinService
      Creates and returns a unique ID for the DIV where the UI is to be rendered.
      Overrides:
      getMainDivId in class VaadinServletService
      Parameters:
      session - The service session to which the bootstrapped UI will belong.
      request - The request for which a div id is needed
      Returns:
      the id to use in the DOM
    • createVaadinSession

      protected VaadinSession createVaadinSession(VaadinRequest request)
      Description copied from class: VaadinService
      Creates a new Vaadin session for this service and request.
      Overrides:
      createVaadinSession in class VaadinService
      Parameters:
      request - The request for which to create a VaadinSession
      Returns:
      A new VaadinSession