Revision: 7025 Author: j...@google.com Date: Thu Nov 19 11:41:10 2009 Log: Merge trunk r7024 into this branch
Hosted => code server changes svn merge --ignore-ancestry -c7024 \ https://google-web-toolkit.googlecode.com/svn/trunk/ . http://code.google.com/p/google-web-toolkit/source/detail?r=7025 Modified: /releases/2.0/branch-info.txt /releases/2.0/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java /releases/2.0/dev/core/src/com/google/gwt/dev/shell/BrowserListener.java ======================================= --- /releases/2.0/branch-info.txt Thu Nov 19 10:43:12 2009 +++ /releases/2.0/branch-info.txt Thu Nov 19 11:41:10 2009 @@ -818,3 +818,8 @@ tr...@7022 was merged into this branch Removes the now unnecessary mac-specific scripts. svn merge --ignore-ancestry -c 7022 https://google-web-toolkit.googlecode.com/svn/trunk . + +tr...@7024 was merged into this branch + Hosted => code server changes + svn merge --ignore-ancestry -c7024 \ + https://google-web-toolkit.googlecode.com/svn/trunk/ . ======================================= --- /releases/2.0/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java Sun Oct 18 11:59:29 2009 +++ /releases/2.0/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java Thu Nov 19 11:41:10 2009 @@ -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(); } ======================================= --- /releases/2.0/dev/core/src/com/google/gwt/dev/shell/BrowserListener.java Wed Nov 18 14:09:08 2009 +++ /releases/2.0/dev/core/src/com/google/gwt/dev/shell/BrowserListener.java Thu Nov 19 11:41:10 2009 @@ -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 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors