Class SessionObjects

java.lang.Object
com.vaadin.browserless.internal.SessionObjects

public final class SessionObjects extends Object
Holds the objects created during session initialization, before they are installed as thread-locals. Used by MockVaadin.createSessionObjects(com.vaadin.flow.server.VaadinServletService) to allow callers (e.g. multi-user context) to manage thread-locals themselves.

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

  • Constructor Details

    • SessionObjects

      public SessionObjects(VaadinSession session, VaadinRequest request, VaadinResponse response, MockHttpSession httpSession)
      Groups the four objects that make up one mocked user's session.
      Parameters:
      session - the session
      request - the request bound to the session
      response - the response bound to the session
      httpSession - the HTTP session the Vaadin session is stored in
  • Method Details

    • getSession

      public VaadinSession getSession()
      Returns the session.
      Returns:
      the session
    • getRequest

      public VaadinRequest getRequest()
      Returns the request bound to the session.
      Returns:
      the request
    • getResponse

      public VaadinResponse getResponse()
      Returns the response bound to the session.
      Returns:
      the response
    • getHttpSession

      public MockHttpSession getHttpSession()
      Returns the HTTP session the Vaadin session is stored in.
      Returns:
      the HTTP session
    • copy

      public SessionObjects copy(VaadinSession session, VaadinRequest request, VaadinResponse response, MockHttpSession httpSession)
      Returns a copy of this group with the given objects in place of the current ones.
      Parameters:
      session - the session
      request - the request bound to the session
      response - the response bound to the session
      httpSession - the HTTP session the Vaadin session is stored in
      Returns:
      the new group
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object