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