Class JavaScriptSnippets

java.lang.Object
net.targetr.rc.client.JavaScriptSnippets

public class JavaScriptSnippets extends Object
JavaScript snippets to help clients perform updates.
Author:
Dr Michael Gardiner
  • Constructor Details

    • JavaScriptSnippets

      public JavaScriptSnippets()
      Constructs a new JavaScriptSnippets.
  • Method Details

    • createUpdateHeader

      public static String createUpdateHeader(String version)
      Creates a snippet to inform the client of a server update.
      Parameters:
      version - the current server version
      Returns:
      the JavaScript string
    • createNoUpdate

      public static String createNoUpdate()
      Creates a snippet to tell the client there are no pending updates.
      Returns:
      the JavaScript string
    • createWsStart

      public static String createWsStart()
      Creates a snippet to notify the client that the WebSocket is active.
      Returns:
      the JavaScript string