public class JdkHttpServerComb extends java.lang.Object implements HttpServerConfigure, ServerLifecycle
| 构造器和说明 |
|---|
JdkHttpServerComb() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addHttpPort(int port)
添加 HttpPort(当 ssl 时,可再开个 http 端口)
|
void |
enableSsl(boolean enable,
javax.net.ssl.SSLContext sslContext)
启用 ssl(并指定 sslContext)
|
boolean |
isSecure() |
void |
setExecutor(java.util.concurrent.Executor executor)
设置执行器(线程池)
|
void |
setHandler(Handler handler) |
void |
start(java.lang.String host,
int port)
启动
|
void |
stop()
停止
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenableDebug, enableHttp2, enableSsl, isSupportedHttp2public void enableSsl(boolean enable,
javax.net.ssl.SSLContext sslContext)
HttpServerConfigureenableSsl 在接口中 HttpServerConfigurepublic void addHttpPort(int port)
addHttpPort 在接口中 HttpServerConfigurepublic void setHandler(Handler handler)
public void setExecutor(java.util.concurrent.Executor executor)
HttpServerConfiguresetExecutor 在接口中 HttpServerConfigurepublic boolean isSecure()
public void start(java.lang.String host,
int port)
throws java.lang.Throwable
ServerLifecyclestart 在接口中 ServerLifecyclehost - 主机(ip)port - 端口java.lang.Throwablepublic void stop()
throws java.lang.Throwable
ServerLifecyclestop 在接口中 ServerLifecyclejava.lang.Throwable