Fix remaining user-visible "hosted" references, cleanup javadoc.

Patch by: jat
Review by: mmendez


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7024 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java b/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java
index 94de64f..52801b5 100644
--- a/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java
+++ b/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java
@@ -61,6 +61,10 @@
     }
   }
 
+  /**
+   * Full qualified class name of JavaScriptObject.  This must be a string
+   * because this class is in a different class loader.
+   */
   public static final String JSO_CLASS = "com.google.gwt.core.client.JavaScriptObject";
 
   private static Map<String, byte[]> iconCache = new HashMap<String, byte[]>();
@@ -81,6 +85,15 @@
 
   private int protocolVersion = -1;
 
+  /**
+   * Create a code server for the supplied socket.
+   * 
+   * @param initialLogger
+   * @param socket
+   * @param handler
+   * @param ignoreRemoteDeath
+   * @throws IOException
+   */
   public BrowserChannelServer(TreeLogger initialLogger, Socket socket,
       SessionHandler handler, boolean ignoreRemoteDeath) throws IOException {
     super(socket, new ServerObjectRefFactory());
@@ -99,6 +112,11 @@
     init(initialLogger);
   }
 
+  /**
+   * Indicate that Java no longer has references to the supplied JS objects.
+   * 
+   * @param ids array of JS object IDs that have been freeded
+   */
   public void freeJsValue(int[] ids) {
     try {
       new FreeMessage(this, ids).send();
@@ -109,6 +127,9 @@
     }
   }
 
+  /**
+   * @return the table of Java objects which have been sent to the browser.
+   */
   public ServerObjectsTable getJavaObjectsExposedInBrowser() {
     return javaObjectsInBrowser;
   }
@@ -177,6 +198,11 @@
     }
   }
 
+  /**
+   * Load the supplied JSNI code into the browser.
+   * 
+   * @param jsni JSNI source to load into the browser
+   */
   public void loadJsni(String jsni) {
     try {
       LoadJsniMessage jsniMessage = new LoadJsniMessage(this, jsni);
@@ -204,6 +230,11 @@
     }
   }
 
+  /**
+   * Close the connection to the browser.
+   * 
+   * @throws IOException
+   */
   public void shutdown() throws IOException {
     QuitMessage.send(this);
   }
@@ -340,8 +371,8 @@
       }
     }
     Thread.currentThread().setName(
-        "Hosting " + moduleName + " for " + userAgent + " on " + url + " @ "
-        + sessionKey);
+        "Code server for " + moduleName + " from " + userAgent + " on " + url
+        + " @ " + sessionKey);
     logger = handler.loadModule(logger, this, moduleName, userAgent, url,
         tabKey, sessionKey, iconBytes);
     try {
@@ -473,7 +504,7 @@
     this.logger = initialLogger;
     Thread thread = new Thread(this);
     thread.setDaemon(true);
-    thread.setName("Hosted mode worker");
+    thread.setName("Code server (initializing)");
     thread.start();
   }
 
diff --git a/dev/core/src/com/google/gwt/dev/shell/BrowserListener.java b/dev/core/src/com/google/gwt/dev/shell/BrowserListener.java
index 7578a45..340b7df 100644
--- a/dev/core/src/com/google/gwt/dev/shell/BrowserListener.java
+++ b/dev/core/src/com/google/gwt/dev/shell/BrowserListener.java
@@ -33,6 +33,13 @@
  */
 public class BrowserListener {
 
+  /**
+   * Get the endpoint identifier (in form host:port) for this listener.
+   * 
+   * @param browserChannelPort
+   * @throws RuntimeException if the local host's address cannot be determined
+   * @return a string of the form host:port
+   */
   public static String computeEndpointIdentifier(int browserChannelPort) {
     try {
       return InetAddress.getLocalHost().getHostAddress() + ":"
@@ -42,6 +49,13 @@
     }
   }
 
+  /**
+   * Get a query parameter to be added to the URL that specifies the address
+   * of this listener.
+   * 
+   * @param endpointIdentifier
+   * @return a query parameter
+   */
   public static String getDevModeURLParams(String endpointIdentifier) {
     return "gwt.codesvr=" + endpointIdentifier;
   }
@@ -54,6 +68,10 @@
 
   /**
    * Listens for new connections from browsers.
+   * 
+   * @param logger 
+   * @param port 
+   * @param handler 
    */
   public BrowserListener(final TreeLogger logger, int port,
       final SessionHandler handler) {
@@ -97,7 +115,7 @@
           }
         }
       };
-      listenThread.setName("Hosted mode listener");
+      listenThread.setName("Code server listener");
       listenThread.setDaemon(true);
     } catch (BindException e) {
       logger.log(TreeLogger.ERROR, "Unable to bind socket on port " + port