public class JdkHttpServer extends java.lang.Object implements ServerLifecycle
构造器和说明 |
---|
JdkHttpServer() |
限定符和类型 | 方法和说明 |
---|---|
void |
enableSsl(boolean enable,
javax.net.ssl.SSLContext sslContext) |
boolean |
isSecure() |
void |
setExecutor(java.util.concurrent.Executor executor) |
void |
setHandler(Handler handler) |
void |
start(java.lang.String host,
int port)
启动
|
void |
stop()
停止
|
public boolean isSecure()
public void enableSsl(boolean enable, @Nullable javax.net.ssl.SSLContext sslContext)
public void setHandler(Handler handler)
public void setExecutor(java.util.concurrent.Executor executor)
public void start(java.lang.String host, int port) throws java.lang.Throwable
ServerLifecycle
start
在接口中 ServerLifecycle
host
- 主机(ip)port
- 端口java.lang.Throwable
public void stop() throws java.lang.Throwable
ServerLifecycle
stop
在接口中 ServerLifecycle
java.lang.Throwable