Package net.targetr.rc.client
Class JavaScriptSnippets
java.lang.Object
net.targetr.rc.client.JavaScriptSnippets
JavaScript snippets to help clients perform updates.
- Author:
- Dr Michael Gardiner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringCreates a snippet to tell the client there are no pending updates.static StringcreateUpdateHeader(String version) Creates a snippet to inform the client of a server update.static StringCreates a snippet to notify the client that the WebSocket is active.
-
Constructor Details
-
JavaScriptSnippets
public JavaScriptSnippets()Constructs a new JavaScriptSnippets.
-
-
Method Details
-
createUpdateHeader
Creates a snippet to inform the client of a server update.- Parameters:
version- the current server version- Returns:
- the JavaScript string
-
createNoUpdate
Creates a snippet to tell the client there are no pending updates.- Returns:
- the JavaScript string
-
createWsStart
Creates a snippet to notify the client that the WebSocket is active.- Returns:
- the JavaScript string
-