public class VxHttpServerComb extends java.lang.Object implements HttpServerConfigure, ServerLifecycle
构造器和说明 |
---|
VxHttpServerComb(AppContext context) |
限定符和类型 | 方法和说明 |
---|---|
void |
addHttpPort(int port)
添加 HttpPort(当 ssl 时,可再开个 http 端口)
|
void |
enableHttp2(boolean enable)
启用 http2 (不一定所有服务都支持)
|
void |
enableSsl(boolean enable,
javax.net.ssl.SSLContext sslContext)
启用 ssl(并指定 sslContext)
|
void |
enableWebSocket(boolean enableWebSocket) |
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, wait
enableDebug, enableSsl, isSupportedHttp2
public VxHttpServerComb(AppContext context)
public void enableSsl(boolean enable, javax.net.ssl.SSLContext sslContext)
HttpServerConfigure
enableSsl
在接口中 HttpServerConfigure
public void enableHttp2(boolean enable)
HttpServerConfigure
enableHttp2
在接口中 HttpServerConfigure
public void addHttpPort(int port)
addHttpPort
在接口中 HttpServerConfigure
public void setHandler(Handler handler)
public void setExecutor(java.util.concurrent.Executor executor)
HttpServerConfigure
setExecutor
在接口中 HttpServerConfigure
public void enableWebSocket(boolean enableWebSocket)
public boolean isSecure()
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