1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.eclipse.jetty.spdy.proxy;
16
17 import java.nio.channels.SocketChannel;
18
19 import org.eclipse.jetty.io.AsyncEndPoint;
20 import org.eclipse.jetty.io.nio.AsyncConnection;
21 import org.eclipse.jetty.spdy.SPDYServerConnector;
22 import org.eclipse.jetty.spdy.http.ServerHTTPAsyncConnectionFactory;
23
24 public class ProxyHTTPAsyncConnectionFactory extends ServerHTTPAsyncConnectionFactory
25 {
26 private final short version;
27 private final ProxyEngineSelector proxyEngineSelector;
28
29 public ProxyHTTPAsyncConnectionFactory(SPDYServerConnector connector, short version, ProxyEngineSelector proxyEngineSelector)
30 {
31 super(connector);
32 this.version = version;
33 this.proxyEngineSelector = proxyEngineSelector;
34 }
35
36 @Override
37 public AsyncConnection newAsyncConnection(SocketChannel channel, AsyncEndPoint endPoint, Object attachment)
38 {
39 return new ProxyHTTPSPDYAsyncConnection(getConnector(), endPoint, version, proxyEngineSelector);
40 }
41 }