moved distribution and start back to jetty-*

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@296 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2009-05-27 00:34:33 +00:00
parent 2b395d279f
commit ce4682e151
2 changed files with 23 additions and 3 deletions

View File

@ -353,7 +353,7 @@
</artifactItem>
<artifactItem>
<groupId>org.eclipse.jetty</groupId>
<artifactId>start</artifactId>
<artifactId>jetty-start</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
@ -536,7 +536,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>start</artifactId>
<artifactId>jetty-start</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>

View File

@ -20,6 +20,7 @@ import org.eclipse.jetty.io.ByteArrayBuffer;
import org.eclipse.jetty.server.LocalConnector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.bio.SocketConnector;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
@ -179,8 +180,27 @@ public class ServletTester
return "http://127.0.0.1:"+connector.getLocalPort();
}
}
}
/* ------------------------------------------------------------ */
public String createChannelConnector(boolean localhost)
throws Exception
{
synchronized (this)
{
SelectChannelConnector connector = new SelectChannelConnector();
if (localhost)
connector.setHost("127.0.0.1");
_server.addConnector(connector);
if (_server.isStarted())
connector.start();
else
connector.open();
return "http://127.0.0.1:"+connector.getLocalPort();
}
}
/* ------------------------------------------------------------ */
/** Create a Socket connector.
* This methods adds a socket connector to the server