Class HeartbeatHandler

  • All Implemented Interfaces:
    RequestHandler, SessionExpiredHandler, java.io.Serializable

    public class HeartbeatHandler
    extends SynchronizedRequestHandler
    implements SessionExpiredHandler
    Handles heartbeat requests. Heartbeat requests are periodically sent by the client-side to inform the server that the UI sending the heartbeat is still alive (the browser window is open, the connection is up) even when there are no UIDL requests for a prolonged period of time. UIs that do not receive either heartbeat or UIDL requests are eventually removed from the session and garbage collected.
    Since:
    7.1
    Author:
    Vaadin Ltd
    See Also:
    Serialized Form
    • Constructor Detail

      • HeartbeatHandler

        public HeartbeatHandler()
    • Method Detail

      • handleSessionExpired

        public boolean handleSessionExpired​(VaadinRequest request,
                                            VaadinResponse response)
                                     throws java.io.IOException
        Description copied from interface: SessionExpiredHandler
        Called when the a session expiration has occurred and a notification needs to be sent to the user. If a response is written, this method should return true to indicate that no more SessionExpiredHandler handlers should be invoked for the request.
        Specified by:
        handleSessionExpired in interface SessionExpiredHandler
        Parameters:
        request - The request to handle
        response - The response object to which a response can be written.
        Returns:
        true if a response has been written and no further request handlers should be called, otherwise false
        Throws:
        java.io.IOException - If an IO error occurred