[277798] fix build failure; this was modified in the wrong file

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@301 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Athena Yao 2009-05-27 02:59:20 +00:00
parent 646454e69c
commit fb7e4aeb29
1 changed files with 13 additions and 6 deletions

View File

@ -13,6 +13,7 @@
package org.eclipse.jetty.testing;
import java.net.InetAddress;
import java.util.Enumeration;
import java.util.EventListener;
@ -183,6 +184,11 @@ public class ServletTester
}
/* ------------------------------------------------------------ */
/** Create a SelectChannel connector.
* This methods adds a select channel connector to the server
* @return A URL to access the server via the connector.
* @throws Exception
*/
public String createChannelConnector(boolean localhost)
throws Exception
{
@ -197,15 +203,16 @@ public class ServletTester
else
connector.open();
return "http://127.0.0.1:"+connector.getLocalPort();
return "http://"+(localhost?"127.0.0.1":
InetAddress.getLocalHost().getHostAddress()
)+":"+connector.getLocalPort();
}
}
/* ------------------------------------------------------------ */
/** Create a Socket connector.
* This methods adds a socket connector to the server
* @param locahost if true, only listen on local host, else listen on all interfaces.
* @return A URL to access the server via the socket connector.
/** Create a local connector.
* This methods adds a local connector to the server
* @return The LocalConnector object
* @throws Exception
*/
public LocalConnector createLocalConnector()