comparison src/org/eclipse/jetty/server/ssl/SslSelectChannelConnector.java @ 887:df84a1741687

make Connector reference to server explicit
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 04 Oct 2016 23:59:56 -0600
parents 150092cebf3e
children 5dc615c34848
comparison
equal deleted inserted replaced
886:0d876a03ab0b 887:df84a1741687
34 import org.eclipse.jetty.io.EndPoint; 34 import org.eclipse.jetty.io.EndPoint;
35 import org.eclipse.jetty.io.RuntimeIOException; 35 import org.eclipse.jetty.io.RuntimeIOException;
36 import org.eclipse.jetty.io.nio.AsyncConnection; 36 import org.eclipse.jetty.io.nio.AsyncConnection;
37 import org.eclipse.jetty.io.nio.SslConnection; 37 import org.eclipse.jetty.io.nio.SslConnection;
38 import org.eclipse.jetty.server.Request; 38 import org.eclipse.jetty.server.Request;
39 import org.eclipse.jetty.server.Server;
39 import org.eclipse.jetty.server.nio.SelectChannelConnector; 40 import org.eclipse.jetty.server.nio.SelectChannelConnector;
40 import org.eclipse.jetty.util.component.AggregateLifeCycle; 41 import org.eclipse.jetty.util.component.AggregateLifeCycle;
41 import org.eclipse.jetty.util.ssl.SslContextFactory; 42 import org.eclipse.jetty.util.ssl.SslContextFactory;
42 43
43 /* ------------------------------------------------------------ */ 44 /* ------------------------------------------------------------ */
50 { 51 {
51 private final SslContextFactory _sslContextFactory; 52 private final SslContextFactory _sslContextFactory;
52 private Buffers _sslBuffers; 53 private Buffers _sslBuffers;
53 54
54 /* ------------------------------------------------------------ */ 55 /* ------------------------------------------------------------ */
55 public SslSelectChannelConnector() 56 public SslSelectChannelConnector(Server server,int port)
56 { 57 {
57 this(new SslContextFactory(SslContextFactory.DEFAULT_KEYSTORE_PATH)); 58 this(new SslContextFactory(SslContextFactory.DEFAULT_KEYSTORE_PATH),server,port);
58 setSoLingerTime(30000); 59 setSoLingerTime(30000);
59 } 60 }
60 61
61 /* ------------------------------------------------------------ */ 62 /* ------------------------------------------------------------ */
62 /** Construct with explicit SslContextFactory. 63 /** Construct with explicit SslContextFactory.
63 * The SslContextFactory passed is added via {@link #addBean(Object)} so that 64 * The SslContextFactory passed is added via {@link #addBean(Object)} so that
64 * it's lifecycle may be managed with {@link AggregateLifeCycle}. 65 * it's lifecycle may be managed with {@link AggregateLifeCycle}.
65 * @param sslContextFactory 66 * @param sslContextFactory
66 */ 67 */
67 public SslSelectChannelConnector(SslContextFactory sslContextFactory) 68 public SslSelectChannelConnector(SslContextFactory sslContextFactory,Server server,int port)
68 { 69 {
70 super(server,port);
69 _sslContextFactory = sslContextFactory; 71 _sslContextFactory = sslContextFactory;
70 addBean(_sslContextFactory); 72 addBean(_sslContextFactory);
71 setUseDirectBuffers(false); 73 setUseDirectBuffers(false);
72 setSoLingerTime(30000); 74 setSoLingerTime(30000);
73 } 75 }