public class HttpServers extends Object
HttpServer instances.| Constructor and Description |
|---|
HttpServers() |
| Modifier and Type | Method and Description |
|---|---|
static InetServer |
createHttpServer(int port,
HttpHandler handler)
Returns a new
HttpServer object, which runs on the provided port. |
static InetServer |
createHttpServer(String name,
HttpConnectorConfig httpConnectorConfig,
HttpHandler handler)
Returns a new
HttpServer object, which runs on the provided port. |
static InetServer |
createHttpsServer(String name,
HttpsConnectorConfig httpsConnectorConfig,
HttpHandler handler)
Returns a new
HttpServer object, using secure HTTPS protocol. |
public static InetServer createHttpServer(int port, HttpHandler handler)
HttpServer object, which runs on the provided port.port - HttpServer objectpublic static InetServer createHttpServer(String name, HttpConnectorConfig httpConnectorConfig, HttpHandler handler)
HttpServer object, which runs on the provided port.name - - Name of the server and associated IO thread.httpConnectorConfig - - HTTP connector configuration.handler - - Request handler.HttpServer objectpublic static InetServer createHttpsServer(String name, HttpsConnectorConfig httpsConnectorConfig, HttpHandler handler)
HttpServer object, using secure HTTPS protocol.name - - Name of the server and associated IO thread.httpsConnectorConfig - - HTTPS endpoint configuration.handler - - Request handler.HttpServer objectCopyright © 2013–2020 Hotels.com. All rights reserved.