Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2012-08-01 21:51:54 -0400
committerGreg Wilkins2012-08-01 21:51:54 -0400
commit96b5c05674e16d335db78d40e0983aad791cf163 (patch)
tree93678924190a1664894c5930068042848ad641a4 /jetty-websocket
parentd6ef039f2c9aa36ff1c788e0ee483a5d86b9db85 (diff)
downloadorg.eclipse.jetty.project-96b5c05674e16d335db78d40e0983aad791cf163.tar.gz
org.eclipse.jetty.project-96b5c05674e16d335db78d40e0983aad791cf163.tar.xz
org.eclipse.jetty.project-96b5c05674e16d335db78d40e0983aad791cf163.zip
jetty-9 one connector passing most tests
Diffstat (limited to 'jetty-websocket')
-rw-r--r--jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/WebSocketClientSelectorManager.java2
-rw-r--r--jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java7
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java2
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java2
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketLoadRFC6455Test.java10
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketOverSSLTest.java3
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/ExampleEchoServer.java2
7 files changed, 17 insertions, 11 deletions
diff --git a/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/WebSocketClientSelectorManager.java b/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/WebSocketClientSelectorManager.java
index 7907510062..5feec1d8b9 100644
--- a/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/WebSocketClientSelectorManager.java
+++ b/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/WebSocketClientSelectorManager.java
@@ -111,7 +111,7 @@ public class WebSocketClientSelectorManager extends SelectorManager
}
};
endPoint.setAsyncConnection(sslConnection);
- AsyncEndPoint sslEndPoint = sslConnection.getSslEndPoint();
+ AsyncEndPoint sslEndPoint = sslConnection.getDecryptedEndPoint();
sslEndPointRef.set(sslEndPoint);
startHandshake(engine);
diff --git a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java
index 48b5b2f195..abaaae7eb1 100644
--- a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java
+++ b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java
@@ -78,6 +78,13 @@ public abstract class WebSocketAsyncConnection extends AbstractAsyncConnection i
}
@Override
+ public void onOpen()
+ {
+ super.onOpen();
+ fillInterested();
+ }
+
+ @Override
public void close() throws IOException
{
terminateConnection(StatusCode.NORMAL,null);
diff --git a/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java b/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java
index ab14da7428..971798f4e8 100644
--- a/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java
+++ b/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java
@@ -354,7 +354,7 @@ public class WebSocketServerFactory extends AbstractLifeCycle implements WebSock
// Create connection
HttpConnection http = HttpConnection.getCurrentConnection();
AsyncEndPoint endp = http.getEndPoint();
- Executor executor = http.getConnector().findExecutor();
+ Executor executor = http.getConnector().getExecutor();
ByteBufferPool bufferPool = http.getConnector().getByteBufferPool();
WebSocketServerAsyncConnection connection = new WebSocketServerAsyncConnection(endp,executor,scheduler,websocket.getPolicy(),bufferPool,this);
// Tell jetty about the new connection
diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java
index 6ab88b8b26..b7abe00029 100644
--- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java
+++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java
@@ -45,7 +45,7 @@ public class SimpleServletServer
{
// Configure Server
server = new Server();
- connector = new SelectChannelConnector();
+ connector = new SelectChannelConnector(server);
server.addConnector(connector);
ServletContextHandler context = new ServletContextHandler();
diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketLoadRFC6455Test.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketLoadRFC6455Test.java
index 789ab727c2..7b4f385f24 100644
--- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketLoadRFC6455Test.java
+++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketLoadRFC6455Test.java
@@ -158,14 +158,12 @@ public class WebSocketLoadRFC6455Test
@BeforeClass
public static void startServer() throws Exception
{
- _server = new Server();
-
- _connector = new SelectChannelConnector();
- _server.addConnector(_connector);
-
QueuedThreadPool threadPool = new QueuedThreadPool(200);
threadPool.setMaxStopTimeMs(1000);
- _server.setThreadPool(threadPool);
+ _server = new Server(threadPool);
+
+ _connector = new SelectChannelConnector(_server);
+ _server.addConnector(_connector);
WebSocketHandler wsHandler = new WebSocketHandler.Simple(MyEchoSocket.class);
wsHandler.setHandler(new DefaultHandler());
diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketOverSSLTest.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketOverSSLTest.java
index 25c54d2090..3f09953a55 100644
--- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketOverSSLTest.java
+++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketOverSSLTest.java
@@ -20,6 +20,7 @@ import java.util.Arrays;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import org.eclipse.jetty.server.SelectChannelConnector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
@@ -95,7 +96,7 @@ public class WebSocketOverSSLTest
private void startServer(final Object websocket) throws Exception
{
_server = new Server();
- SslSelectChannelConnector connector = new SslSelectChannelConnector();
+ SelectChannelConnector connector = new SelectChannelConnector(_server,true);
_server.addConnector(connector);
SslContextFactory cf = connector.getSslContextFactory();
cf.setKeyStorePath(MavenTestingUtils.getTestResourceFile("keystore").getAbsolutePath());
diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/ExampleEchoServer.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/ExampleEchoServer.java
index f9ee1c5746..e6d3857f52 100644
--- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/ExampleEchoServer.java
+++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/ExampleEchoServer.java
@@ -89,7 +89,7 @@ public class ExampleEchoServer
public ExampleEchoServer(int port)
{
server = new Server();
- connector = new SelectChannelConnector();
+ connector = new SelectChannelConnector(server);
connector.setPort(port);
server.addConnector(connector);

Back to the top