com.vaadin.flow.server.communication.

Class PushHandler

java.lang.Object
com.vaadin.flow.server.communication.PushHandler
public class PushHandler extends Object

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 Details

    • PushHandler

      public PushHandler(VaadinServletService service)

      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