Merge branch 'jetty-9' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project into jetty-9
This commit is contained in:
commit
7246b279e2
|
@ -0,0 +1,22 @@
|
|||
package org.eclipse.jetty.websocket.client.io;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
import org.eclipse.jetty.io.AsyncEndPoint;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.websocket.api.WebSocketPolicy;
|
||||
import org.eclipse.jetty.websocket.client.WebSocketClientFactory;
|
||||
import org.eclipse.jetty.websocket.io.WebSocketAsyncConnection;
|
||||
|
||||
public class WebSocketClientAsyncConnection extends WebSocketAsyncConnection
|
||||
{
|
||||
private final WebSocketClientFactory factory;
|
||||
|
||||
public WebSocketClientAsyncConnection(AsyncEndPoint endp, Executor executor, ScheduledExecutorService scheduler, WebSocketPolicy policy,
|
||||
ByteBufferPool bufferPool, WebSocketClientFactory factory)
|
||||
{
|
||||
super(endp,executor,scheduler,policy,bufferPool);
|
||||
this.factory = factory;
|
||||
}
|
||||
}
|
|
@ -21,6 +21,7 @@ import java.nio.channels.SocketChannel;
|
|||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import javax.net.ssl.SSLEngine;
|
||||
import javax.net.ssl.SSLException;
|
||||
|
||||
|
@ -76,7 +77,7 @@ public class WebSocketClientSelectorManager extends SelectorManager
|
|||
ByteBufferPool bufferPool = factory.getBufferPool();
|
||||
ScheduledExecutorService scheduler = factory.getScheduler();
|
||||
|
||||
WebSocketAsyncConnection connection = new WebSocketAsyncConnection(endPoint,executor,scheduler,policy,bufferPool);
|
||||
WebSocketAsyncConnection connection = new WebSocketClientAsyncConnection(endPoint,executor,scheduler,policy,bufferPool,factory);
|
||||
endPoint.setAsyncConnection(connection);
|
||||
connection.getParser().setIncomingFramesHandler(websocket);
|
||||
|
||||
|
@ -137,7 +138,7 @@ public class WebSocketClientSelectorManager extends SelectorManager
|
|||
@Override
|
||||
protected SelectChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey selectionKey) throws IOException
|
||||
{
|
||||
return new SelectChannelEndPoint(channel,selectSet, selectionKey, scheduler, policy.getIdleTimeout());
|
||||
return new SelectChannelEndPoint(channel,selectSet,selectionKey,scheduler,policy.getIdleTimeout());
|
||||
}
|
||||
|
||||
public SSLEngine newSSLEngine(SslContextFactory sslContextFactory, SocketChannel channel)
|
||||
|
|
Loading…
Reference in New Issue