1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.eclipse.jetty.spdy.http;
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.server.AsyncHttpConnection;
22 import org.eclipse.jetty.spdy.AsyncConnectionFactory;
23 import org.eclipse.jetty.spdy.SPDYServerConnector;
24
25 public class ServerHTTPAsyncConnectionFactory implements AsyncConnectionFactory
26 {
27 private final SPDYServerConnector connector;
28
29 public ServerHTTPAsyncConnectionFactory(SPDYServerConnector connector)
30 {
31 this.connector = connector;
32 }
33
34 public SPDYServerConnector getConnector()
35 {
36 return connector;
37 }
38
39 @Override
40 public AsyncConnection newAsyncConnection(SocketChannel channel, AsyncEndPoint endPoint, Object attachment)
41 {
42 return new AsyncHttpConnection(connector, endPoint, connector.getServer());
43 }
44 }