Package com.vaadin.client.communication
Class AtmospherePushConnection.FragmentedMessage
java.lang.Object
com.vaadin.client.communication.AtmospherePushConnection.FragmentedMessage
- Enclosing class:
- AtmospherePushConnection
Represents a message splitted into multiple fragments of maximum length
FRAGMENT_LENGTH.-
Constructor Summary
ConstructorsConstructorDescriptionFragmentedMessage(String message) Creates a new instance based on the given message. -
Method Summary
Modifier and TypeMethodDescriptionGets the following fragment and increments the internal fragment counter so the following call to this method will return the following fragment.booleanChecks if there is another fragment which can be retrieved usinggetNextFragment()or if all fragments have been retrieved.
-
Constructor Details
-
FragmentedMessage
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 usinggetNextFragment()or if all fragments have been retrieved.- Returns:
- true if there is another fragment to retrieve, false otherwise
-
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
-