return config;
}
- protected void onOpen(AtmosphereResponse response) {
- transport = response.getTransport();
+ protected void onReopen(AtmosphereResponse response) {
+ VConsole.log("Push connection re-established using " + transport);
+ onConnect(response);
+ }
+ protected void onOpen(AtmosphereResponse response) {
VConsole.log("Push connection established using " + transport);
+ onConnect(response);
+ }
+
+ /**
+ * Called whenever a server push connection is established (or
+ * re-established).
+ *
+ * @param response
+ *
+ * @since 7.2
+ */
+ protected void onConnect(AtmosphereResponse response) {
+ transport = response.getTransport();
switch (state) {
case CONNECT_PENDING:
reconnectInterval: 5000,
maxReconnectOnClose: 10000000,
trackMessageLength: true,
+ enableProtocol: false,
messageDelimiter: String.fromCharCode(@com.vaadin.shared.communication.PushConstants::MESSAGE_DELIMITER)
};
}-*/;
config.onOpen = $entry(function(response) {
self.@com.vaadin.client.communication.AtmospherePushConnection::onOpen(*)(response);
});
+ config.onReopen = $entry(function(response) {
+ self.@com.vaadin.client.communication.AtmospherePushConnection::onReopen(*)(response);
+ });
config.onMessage = $entry(function(response) {
self.@com.vaadin.client.communication.AtmospherePushConnection::onMessage(*)(response);
});