Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2012-08-03 17:28:06 +0000
committerThomas Becker2012-08-03 17:28:06 +0000
commit3187fe00fe4bd5387fd9b7a276cb0906d50a02d4 (patch)
treed3d53e6649ac4d407c58024a79f2e8d701709e8c
parent5743483f9c613a02ebb554a3a0ee75d866a206a6 (diff)
parentb1bb418fea9bf0a16de2a1e80ec4d871ba96f249 (diff)
downloadorg.eclipse.jetty.project-3187fe00fe4bd5387fd9b7a276cb0906d50a02d4.tar.gz
org.eclipse.jetty.project-3187fe00fe4bd5387fd9b7a276cb0906d50a02d4.tar.xz
org.eclipse.jetty.project-3187fe00fe4bd5387fd9b7a276cb0906d50a02d4.zip
Merge branch 'jetty-9' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project into jetty-9
-rw-r--r--jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyEndPoint.java (renamed from jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java)2
-rw-r--r--jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoClientConnection.java (renamed from jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoClientAsyncConnection.java)6
-rw-r--r--jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYClient.java8
-rw-r--r--jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYConnection.java (renamed from jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYAsyncConnection.java)10
-rw-r--r--jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java24
-rw-r--r--jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/ServerSPDYAsyncConnectionFactory.java6
6 files changed, 20 insertions, 36 deletions
diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyEndPoint.java
index 8dc81ca8c6..2b7189c1ad 100644
--- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java
+++ b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyEndPoint.java
@@ -23,7 +23,7 @@ import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.util.Callback;
-public class EmptyAsyncEndPoint implements EndPoint
+public class EmptyEndPoint implements EndPoint
{
private boolean checkForIdle;
private Connection connection;
diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoClientAsyncConnection.java b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoClientConnection.java
index cb9e601939..e1cab1e782 100644
--- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoClientAsyncConnection.java
+++ b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/NextProtoNegoClientConnection.java
@@ -26,7 +26,7 @@ import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
-public class NextProtoNegoClientAsyncConnection extends AbstractConnection implements NextProtoNego.ClientProvider
+public class NextProtoNegoClientConnection extends AbstractConnection implements NextProtoNego.ClientProvider
{
private final Logger logger = Log.getLogger(getClass());
private final SocketChannel channel;
@@ -34,7 +34,7 @@ public class NextProtoNegoClientAsyncConnection extends AbstractConnection imple
private final SPDYClient client;
private volatile boolean completed;
- public NextProtoNegoClientAsyncConnection(SocketChannel channel, EndPoint endPoint, Object attachment, Executor executor, SPDYClient client)
+ public NextProtoNegoClientConnection(SocketChannel channel, EndPoint endPoint, Object attachment, Executor executor, SPDYClient client)
{
super(endPoint, executor);
this.channel = channel;
@@ -48,7 +48,7 @@ public class NextProtoNegoClientAsyncConnection extends AbstractConnection imple
super.onOpen();
fillInterested();
}
-
+
@Override
public void onFillable()
{
diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYClient.java b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYClient.java
index 81865d5b2f..0f1eba588a 100644
--- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYClient.java
+++ b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYClient.java
@@ -347,7 +347,7 @@ public class SPDYClient
};
EndPoint sslEndPoint = sslConnection.getDecryptedEndPoint();
- NextProtoNegoClientAsyncConnection connection = new NextProtoNegoClientAsyncConnection(channel, sslEndPoint, attachment, client.factory.threadPool, client);
+ NextProtoNegoClientConnection connection = new NextProtoNegoClientConnection(channel, sslEndPoint, attachment, client.factory.threadPool, client);
sslEndPoint.setConnection(connection);
connectionOpened(connection);
@@ -414,7 +414,7 @@ public class SPDYClient
Parser parser = new Parser(compressionFactory.newDecompressor());
Generator generator = new Generator(factory.bufferPool, compressionFactory.newCompressor());
- SPDYAsyncConnection connection = new ClientSPDYAsyncConnection(endPoint, factory.bufferPool, parser, factory);
+ SPDYConnection connection = new ClientSPDYConnection(endPoint, factory.bufferPool, parser, factory);
endPoint.setConnection(connection);
FlowControlStrategy flowControlStrategy = client.newFlowControlStrategy();
@@ -430,11 +430,11 @@ public class SPDYClient
return connection;
}
- private class ClientSPDYAsyncConnection extends SPDYAsyncConnection
+ private class ClientSPDYConnection extends SPDYConnection
{
private final Factory factory;
- public ClientSPDYAsyncConnection(EndPoint endPoint, ByteBufferPool bufferPool, Parser parser, Factory factory)
+ public ClientSPDYConnection(EndPoint endPoint, ByteBufferPool bufferPool, Parser parser, Factory factory)
{
super(endPoint, bufferPool, parser, factory.threadPool);
this.factory = factory;
diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYAsyncConnection.java b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYConnection.java
index 810ad41020..c92b72ee5f 100644
--- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYAsyncConnection.java
+++ b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYConnection.java
@@ -18,23 +18,23 @@ import java.nio.ByteBuffer;
import java.util.concurrent.Executor;
import org.eclipse.jetty.io.AbstractConnection;
-import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ByteBufferPool;
+import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.RuntimeIOException;
import org.eclipse.jetty.spdy.parser.Parser;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
-public class SPDYAsyncConnection extends AbstractConnection implements Controller<StandardSession.FrameBytes>, IdleListener
+public class SPDYConnection extends AbstractConnection implements Controller<StandardSession.FrameBytes>, IdleListener
{
- private static final Logger logger = Log.getLogger(SPDYAsyncConnection.class);
+ private static final Logger logger = Log.getLogger(SPDYConnection.class);
private final ByteBufferPool bufferPool;
private final Parser parser;
private volatile ISession session;
private volatile boolean idle = false;
- public SPDYAsyncConnection(EndPoint endPoint, ByteBufferPool bufferPool, Parser parser, Executor executor)
+ public SPDYConnection(EndPoint endPoint, ByteBufferPool bufferPool, Parser parser, Executor executor)
{
super(endPoint, executor);
this.bufferPool = bufferPool;
@@ -48,7 +48,7 @@ public class SPDYAsyncConnection extends AbstractConnection implements Controlle
super.onOpen();
fillInterested();
}
-
+
@Override
public void onFillable()
{
diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java
index 006330f176..115808e9ea 100644
--- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java
+++ b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java
@@ -21,8 +21,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.Executor;
-import java.util.concurrent.RejectedExecutionException;
import javax.net.ssl.SSLEngine;
import org.eclipse.jetty.io.Connection;
@@ -42,7 +40,7 @@ public class SPDYServerConnector extends SelectChannelConnector
{
private final Queue<Session> sessions = new ConcurrentLinkedQueue<>();
private final ServerSessionFrameListener listener;
- private volatile int initialWindowSize = 65536;
+ private volatile int initialWindowSize;
public SPDYServerConnector(Server server, ServerSessionFrameListener listener)
{
@@ -53,6 +51,7 @@ public class SPDYServerConnector extends SelectChannelConnector
{
super(server, sslContextFactory);
this.listener = listener;
+ setInitialWindowSize(65536);
putConnectionFactory("spdy/3", new ServerSPDYAsyncConnectionFactory(SPDY.V3, getByteBufferPool(), getExecutor(), getScheduler(), listener));
putConnectionFactory("spdy/2", new ServerSPDYAsyncConnectionFactory(SPDY.V2, getByteBufferPool(), getExecutor(), getScheduler(), listener));
setDefaultConnectionFactory(getConnectionFactory("spdy/2"));
@@ -173,25 +172,10 @@ public class SPDYServerConnector extends SelectChannelConnector
getSelectorManager().connectionUpgraded(endPoint, oldConnection);
}
- private class LazyExecutor implements Executor
- {
- @Override
- public void execute(Runnable command)
- {
- Executor threadPool = getExecutor();
- if (threadPool == null)
- throw new RejectedExecutionException();
- threadPool.execute(command);
- }
- }
-
-
@Override
public void dump(Appendable out, String indent) throws IOException
{
- super.dump(out,indent);
- AggregateLifeCycle.dump(out, indent, new ArrayList<Session>(sessions));
+ super.dump(out, indent);
+ AggregateLifeCycle.dump(out, indent, new ArrayList<>(sessions));
}
-
-
}
diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/ServerSPDYAsyncConnectionFactory.java b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/ServerSPDYAsyncConnectionFactory.java
index 6f85719977..12624d8bd0 100644
--- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/ServerSPDYAsyncConnectionFactory.java
+++ b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/ServerSPDYAsyncConnectionFactory.java
@@ -62,7 +62,7 @@ public class ServerSPDYAsyncConnectionFactory implements ConnectionFactory
SPDYServerConnector connector = (SPDYServerConnector)attachment;
ServerSessionFrameListener listener = provideServerSessionFrameListener(endPoint, attachment);
- SPDYAsyncConnection connection = new ServerSPDYAsyncConnection(endPoint, bufferPool, parser, listener, connector);
+ SPDYConnection connection = new ServerSPDYConnection(endPoint, bufferPool, parser, listener, connector);
endPoint.setConnection(connection);
FlowControlStrategy flowControlStrategy = connector.newFlowControlStrategy(version);
@@ -83,13 +83,13 @@ public class ServerSPDYAsyncConnectionFactory implements ConnectionFactory
return listener;
}
- private static class ServerSPDYAsyncConnection extends SPDYAsyncConnection
+ private static class ServerSPDYConnection extends SPDYConnection
{
private final ServerSessionFrameListener listener;
private final SPDYServerConnector connector;
private volatile boolean connected;
- private ServerSPDYAsyncConnection(EndPoint endPoint, ByteBufferPool bufferPool, Parser parser, ServerSessionFrameListener listener, SPDYServerConnector connector)
+ private ServerSPDYConnection(EndPoint endPoint, ByteBufferPool bufferPool, Parser parser, ServerSessionFrameListener listener, SPDYServerConnector connector)
{
super(endPoint, bufferPool, parser, connector.getExecutor());
this.listener = listener;

Back to the top