Class AtmospherePushConnection.FragmentedMessage

java.lang.Object
com.vaadin.client.communication.AtmospherePushConnection.FragmentedMessage
Enclosing class:
AtmospherePushConnection

protected static class AtmospherePushConnection.FragmentedMessage extends Object
Represents a message splitted into multiple fragments of maximum length FRAGMENT_LENGTH.
  • Constructor Details

    • FragmentedMessage

      public FragmentedMessage(String message)
      Creates a new instance based on the given message.
      Parameters:
      message - the message to wrap
  • Method Details

    • hasNextFragment

      public boolean hasNextFragment()
      Checks if there is another fragment which can be retrieved using getNextFragment() or if all fragments have been retrieved.
      Returns:
      true if there is another fragment to retrieve, false otherwise
    • getNextFragment

      public String getNextFragment()
      Gets the following fragment and increments the internal fragment counter so the following call to this method will return the following fragment.

      This method should not be called if all fragments have been received (hasNextFragment() returns false).

      Returns:
      the next fragment