Class PushHandler
java.lang.Object
com.vaadin.flow.server.communication.PushHandler
Handles incoming push connections and messages and dispatches them to the
correct
UI
/ AtmospherePushConnection
.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
ConstructorDescriptionPushHandler
(VaadinServletService service) Creates an instance connected to the given service. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the timeout used for suspend calls when using long polling.void
setLongPollingSuspendTimeout
(int longPollingSuspendTimeout) Sets the timeout used for suspend calls when using long polling.protected void
suspend
(org.atmosphere.cpr.AtmosphereResource resource) Suspends the given resource
-
Constructor Details
-
PushHandler
Creates an instance connected to the given service.- Parameters:
service
- the service this handler belongs to
-
-
Method Details
-
suspend
protected void suspend(org.atmosphere.cpr.AtmosphereResource resource) Suspends the given resource- Parameters:
resource
- the resource to suspend
-
setLongPollingSuspendTimeout
public void setLongPollingSuspendTimeout(int longPollingSuspendTimeout) Sets the timeout used for suspend calls when using long polling. If you are using a proxy with a defined idle timeout, set the suspend timeout to a value smaller than the proxy timeout so that the server is aware of a reconnect taking place.- Parameters:
longPollingSuspendTimeout
- the timeout to use for suspended AtmosphereResources
-
getLongPollingSuspendTimeout
public int getLongPollingSuspendTimeout()Gets the timeout used for suspend calls when using long polling.- Returns:
- the timeout to use for suspended AtmosphereResources
-