Class HttpsServer

  • public abstract class HttpsServer
    extends HttpServer
    This class is an extension of HttpServer which provides support for HTTPS.

    A HttpsServer must have an associated HttpsConfigurator object which is used to establish the SSL configuration for the SSL connections.

    All other configuration is the same as for HttpServer.

    • Constructor Detail

      • HttpsServer

        protected HttpsServer()
    • Method Detail

      • create

        public static HttpsServer create​(InetSocketAddress addr,
                                         int backlog)
                                  throws IOException
        Create a HttpsServer instance which will bind to the specified InetSocketAddress (IP address and port number) A maximum backlog can also be specified. This is the maximum number of queued incoming connections to allow on the listening socket. Queued TCP connections exceeding this limit may be rejected by the TCP implementation. The HttpsServer is acquired from the currently installed HttpServerProvider The server must have a HttpsConfigurator established with setHttpsConfigurator(HttpsConfigurator)
        addr - the address to listen on, if null then bind() must be called to set the address
        backlog - the socket backlog. If this value is less than or equal to zero, then a system default value is used.
        BindException - if the server cannot bind to the requested address, or if the server is already bound.
      • getHttpsConfigurator

        public abstract HttpsConfigurator getHttpsConfigurator()
        Gets this server's HttpsConfigurator object, if it has been set.
        the HttpsConfigurator for this server, or null if not set.