Package com.vaadin.client.communication
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 lengthFRAGMENT_LENGTH.
-
-
Constructor Summary
Constructors Constructor Description FragmentedMessage(String message)Creates a new instance based on the given message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetNextFragment()Gets the following fragment and increments the internal fragment counter so the following call to this method will return the following fragment.booleanhasNextFragment()Checks if there is another fragment which can be retrieved usinggetNextFragment()or if all fragments have been retrieved.
-
-
-
Constructor Detail
-
FragmentedMessage
public FragmentedMessage(String message)
Creates a new instance based on the given message.- Parameters:
message- the message to wrap
-
-
Method Detail
-
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
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
-
-