Class MessageIdSyncErrorEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.server.communication.MessageIdSyncErrorEvent
All Implemented Interfaces:
Serializable

public class MessageIdSyncErrorEvent extends EventObject
Event fired through the service event bus when the client sent a message with an id the server did not expect, on the request thread while the session is locked.

The message is not processed and the client is shown the session synchronization error. This typically happens when the server that handled the UI stopped before the UI state was stored, and the client continues on another server with an older state.

See Also:
  • Constructor Details

    • MessageIdSyncErrorEvent

      public MessageIdSyncErrorEvent(UI ui, int expectedId, int receivedId)
      Creates a new event.
      Parameters:
      ui - the UI the message was sent to, not null
      expectedId - the message id the server expected
      receivedId - the message id the client sent
  • Method Details

    • getUI

      public UI getUI()
      Gets the UI the message was sent to.
      Returns:
      the UI, not null
    • getExpectedId

      public int getExpectedId()
      Gets the message id the server expected.
      Returns:
      the expected message id
    • getReceivedId

      public int getReceivedId()
      Gets the message id the client sent.
      Returns:
      the received message id