diff options
Diffstat (limited to 'shared')
4 files changed, 38 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ApplicationConstants.java b/shared/src/com/vaadin/shared/ApplicationConstants.java index 3431387b77..55d2dae946 100644 --- a/shared/src/com/vaadin/shared/ApplicationConstants.java +++ b/shared/src/com/vaadin/shared/ApplicationConstants.java @@ -133,6 +133,12 @@ public class ApplicationConstants implements Serializable { public static final String SERVER_SYNC_ID = "syncId"; /** + * The name of the parameter used to transmit the id of the client to server + * messages. + */ + public static final String CLIENT_TO_SERVER_ID = "clientId"; + + /** * Default value to use in case the security protection is disabled. */ public static final String CSRF_TOKEN_DEFAULT_VALUE = "init"; @@ -142,4 +148,10 @@ public class ApplicationConstants implements Serializable { */ public static final String RESYNCHRONIZE_ID = "resynchronize"; + /** + * The name of the parameter used for sending the widget set version to the + * server + */ + public static final String WIDGETSET_VERSION_ID = "wsver"; + } diff --git a/shared/src/com/vaadin/shared/ui/ui/Transport.java b/shared/src/com/vaadin/shared/ui/ui/Transport.java index 54d0f08434..6263f3039d 100644 --- a/shared/src/com/vaadin/shared/ui/ui/Transport.java +++ b/shared/src/com/vaadin/shared/ui/ui/Transport.java @@ -28,6 +28,12 @@ public enum Transport { */ WEBSOCKET("websocket"), /** + * Websockets for server to client, XHR for client to server + * + * @since 7.6 + */ + WEBSOCKET_XHR("websocket-xhr"), + /** * HTTP streaming * * @deprecated Use the more reliable {@link Transport#LONG_POLLING} instead. diff --git a/shared/src/com/vaadin/shared/ui/ui/UIState.java b/shared/src/com/vaadin/shared/ui/ui/UIState.java index 6f7a531eb6..442c3a1ffb 100644 --- a/shared/src/com/vaadin/shared/ui/ui/UIState.java +++ b/shared/src/com/vaadin/shared/ui/ui/UIState.java @@ -72,6 +72,7 @@ public class UIState extends TabIndexState { * @since 7.3 */ public String theme; + public ReconnectDialogConfigurationState reconnectDialogConfiguration = new ReconnectDialogConfigurationState(); { primaryStyleName = "v-ui"; // Default is 1 for legacy reasons @@ -113,6 +114,7 @@ public class UIState extends TabIndexState { public static final String TRANSPORT_PARAM = "transport"; public static final String FALLBACK_TRANSPORT_PARAM = "fallbackTransport"; + public boolean alwaysUseXhrForServerRequests = false; public PushMode mode = PushMode.DISABLED; public Map<String, String> parameters = new HashMap<String, String>(); { @@ -123,6 +125,16 @@ public class UIState extends TabIndexState { } } + public static class ReconnectDialogConfigurationState implements + Serializable { + public String dialogText = "Server connection lost, trying to reconnect..."; + public String dialogTextGaveUp = "Server connection lost."; + public int reconnectAttempts = 10000; + public int reconnectInterval = 5000; + public int dialogGracePeriod = 1000; + public boolean dialogModal = true; + } + public static class LocaleServiceState implements Serializable { public List<LocaleData> localeData = new ArrayList<LocaleData>(); } diff --git a/shared/src/com/vaadin/shared/ui/upload/UploadServerRpc.java b/shared/src/com/vaadin/shared/ui/upload/UploadServerRpc.java index b576eb9114..b353057ab3 100644 --- a/shared/src/com/vaadin/shared/ui/upload/UploadServerRpc.java +++ b/shared/src/com/vaadin/shared/ui/upload/UploadServerRpc.java @@ -27,4 +27,12 @@ public interface UploadServerRpc extends ServerRpc { */ void change(String filename); + /** + * Called to poll the server to see if any changes have been made e.g. when + * starting upload + * + * @since + */ + void poll(); + } |