com.vaadin.server.communication.
Class PushHandler
- java.lang.Object
-
- com.vaadin.server.communication.PushHandler
-
public class PushHandler extends Object
Handles incoming push connections and messages and dispatches them to the correct
UI
/AtmospherePushConnection
.Since:
7.1
Author:
Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description PushHandler(VaadinServletService service)
-
Method Summary
All Methods Modifier and Type Method Description protected ServerRpcHandler
createRpcHandler()
Creates the ServerRpcHandler to use.
int
getLongPollingSuspendTimeout()
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 Detail
-
PushHandler
public PushHandler(VaadinServletService service)
-
-
Method Detail
-
createRpcHandler
protected ServerRpcHandler createRpcHandler()
Creates the ServerRpcHandler to use.
Returns:
the ServerRpcHandler to use
Since:
8.5
-
suspend
protected void suspend(org.atmosphere.cpr.AtmosphereResource resource)
Suspends the given resource.
Parameters:
resource
- the resource to suspendSince:
7.6
-
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 AtmosphereResourcesSince:
7.6
-
getLongPollingSuspendTimeout
public int getLongPollingSuspendTimeout()
Gets the timeout used for suspend calls when using long polling.
Returns:
the timeout to use for suspended AtmosphereResources
Since:
7.6
-
-