Class LongPollingCacheFilter
java.lang.Object
com.vaadin.flow.server.communication.LongPollingCacheFilter
- All Implemented Interfaces:
Serializable
,org.atmosphere.cpr.BroadcastFilter
,org.atmosphere.cpr.PerRequestBroadcastFilter
public class LongPollingCacheFilter
extends Object
implements org.atmosphere.cpr.PerRequestBroadcastFilter, Serializable
A
PerRequestBroadcastFilter
implementation that handles
AtmospherePushConnection.PushMessage
s
to ensure that a message is preserved in the BroadcasterCache
until
the client has received it.
The filter acts only on LONG POLLING transport and expects that
the client sends the X-Vaadin-LastSeenServerSyncId header with the
identifier of the last message seen, every time the connection is
established.
Messages already seen are discarded, whereas messages not yet sent to the
client are added again to the cache to preserve them until client confirms
reception by sending the last seen message identifier.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.atmosphere.cpr.BroadcastFilter
org.atmosphere.cpr.BroadcastFilter.BroadcastAction
-
Field Summary
Fields inherited from interface org.atmosphere.cpr.BroadcastFilter
VOID_ATMOSPHERE_RESOURCE_UUID
-
Constructor Summary
-
Method Summary
-
Field Details
-
SEEN_SERVER_SYNC_ID
- See Also:
-
-
Constructor Details
-
LongPollingCacheFilter
public LongPollingCacheFilter()
-
-
Method Details
-
filter
public org.atmosphere.cpr.BroadcastFilter.BroadcastAction filter(String broadcasterId, org.atmosphere.cpr.AtmosphereResource r, Object originalMessage, Object message) - Specified by:
filter
in interfaceorg.atmosphere.cpr.PerRequestBroadcastFilter
-
filter
public org.atmosphere.cpr.BroadcastFilter.BroadcastAction filter(String broadcasterId, Object originalMessage, Object message) - Specified by:
filter
in interfaceorg.atmosphere.cpr.BroadcastFilter
-