jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java
equal
deleted
inserted
replaced
40 * https connection on a HttpsServer. Applications need to override |
40 * https connection on a HttpsServer. Applications need to override |
41 * the {@link #configure(HttpsParameters)} method in order to change |
41 * the {@link #configure(HttpsParameters)} method in order to change |
42 * the default configuration. |
42 * the default configuration. |
43 * <p> |
43 * <p> |
44 * The following <a name="example">example</a> shows how this may be done: |
44 * The following <a name="example">example</a> shows how this may be done: |
45 * <p> |
45 * |
46 * <pre><blockquote> |
46 * <blockquote><pre> |
47 * SSLContext sslContext = SSLContext.getInstance (....); |
47 * SSLContext sslContext = SSLContext.getInstance (....); |
48 * HttpsServer server = HttpsServer.create(); |
48 * HttpsServer server = HttpsServer.create(); |
49 * |
49 * |
50 * server.setHttpsConfigurator (new HttpsConfigurator(sslContext) { |
50 * server.setHttpsConfigurator (new HttpsConfigurator(sslContext) { |
51 * public void configure (HttpsParameters params) { |
51 * public void configure (HttpsParameters params) { |
62 * } |
62 * } |
63 * |
63 * |
64 * params.setSSLParameters(sslparams); |
64 * params.setSSLParameters(sslparams); |
65 * } |
65 * } |
66 * }); |
66 * }); |
67 * </blockquote></pre> |
67 * </pre></blockquote> |
68 * @since 1.6 |
68 * @since 1.6 |
69 */ |
69 */ |
70 @jdk.Exported |
70 @jdk.Exported |
71 public class HttpsConfigurator { |
71 public class HttpsConfigurator { |
72 |
72 |
100 * {@link HttpsParameters#setSSLParameters(SSLParameters)} |
100 * {@link HttpsParameters#setSSLParameters(SSLParameters)} |
101 * in order to set the SSL parameters for the connection. |
101 * in order to set the SSL parameters for the connection. |
102 * <p> |
102 * <p> |
103 * The default implementation of this method uses the |
103 * The default implementation of this method uses the |
104 * SSLParameters returned from <p> |
104 * SSLParameters returned from <p> |
105 * <code>getSSLContext().getDefaultSSLParameters()</code> |
105 * {@code getSSLContext().getDefaultSSLParameters()} |
106 * <p> |
106 * <p> |
107 * configure() may be overridden in order to modify this behavior. |
107 * configure() may be overridden in order to modify this behavior. |
108 * See, the example <a href="#example">above</a>. |
108 * See, the example <a href="#example">above</a>. |
109 * @param params the HttpsParameters to be configured. |
109 * @param params the HttpsParameters to be configured. |
110 * |
110 * |