28 import java.net.*;
29 import java.io.*;
30 import java.nio.*;
31 import java.security.*;
32 import java.nio.channels.*;
33 import java.util.*;
34 import java.util.concurrent.*;
35 import javax.net.ssl.*;
36 import com.sun.net.httpserver.spi.*;
37
38 /**
39 * This class is an extension of {@link HttpServer} which provides
40 * support for HTTPS. <p>
41 * A HttpsServer must have an associated {@link HttpsConfigurator} object
42 * which is used to establish the SSL configuration for the SSL connections.
43 * <p>
44 * All other configuration is the same as for HttpServer.
45 * @since 1.6
46 */
47
48 public abstract class HttpsServer extends HttpServer {
49
50 /**
51 */
52 protected HttpsServer () {
53 }
54
55 /**
56 * creates a HttpsServer instance which is initially not bound to any local address/port.
57 * The HttpsServer is acquired from the currently installed {@link HttpServerProvider}
58 * The server must be bound using {@link #bind(InetSocketAddress,int)} before it can be used.
59 * The server must also have a HttpsConfigurator established with {@link #setHttpsConfigurator(HttpsConfigurator)}
60 * @throws IOException
61 */
62 public static HttpsServer create () throws IOException {
63 return create (null, 0);
64 }
65
66 /**
67 * Create a <code>HttpsServer</code> instance which will bind to the
|
28 import java.net.*;
29 import java.io.*;
30 import java.nio.*;
31 import java.security.*;
32 import java.nio.channels.*;
33 import java.util.*;
34 import java.util.concurrent.*;
35 import javax.net.ssl.*;
36 import com.sun.net.httpserver.spi.*;
37
38 /**
39 * This class is an extension of {@link HttpServer} which provides
40 * support for HTTPS. <p>
41 * A HttpsServer must have an associated {@link HttpsConfigurator} object
42 * which is used to establish the SSL configuration for the SSL connections.
43 * <p>
44 * All other configuration is the same as for HttpServer.
45 * @since 1.6
46 */
47
48 @jdk.Supported
49 public abstract class HttpsServer extends HttpServer {
50
51 /**
52 */
53 protected HttpsServer () {
54 }
55
56 /**
57 * creates a HttpsServer instance which is initially not bound to any local address/port.
58 * The HttpsServer is acquired from the currently installed {@link HttpServerProvider}
59 * The server must be bound using {@link #bind(InetSocketAddress,int)} before it can be used.
60 * The server must also have a HttpsConfigurator established with {@link #setHttpsConfigurator(HttpsConfigurator)}
61 * @throws IOException
62 */
63 public static HttpsServer create () throws IOException {
64 return create (null, 0);
65 }
66
67 /**
68 * Create a <code>HttpsServer</code> instance which will bind to the
|