public class VxHttpServerComb extends java.lang.Object implements HttpServerConfigure, ServerLifecycle
限定符和类型 | 字段和说明 |
---|---|
protected java.util.Set<java.lang.Integer> |
addHttpPorts |
protected boolean |
enableHttp2 |
protected boolean |
enableSsl |
protected java.util.List<VxHttpServer> |
servers |
protected javax.net.ssl.SSLContext |
sslContext |
构造器和说明 |
---|
VxHttpServerComb() |
限定符和类型 | 方法和说明 |
---|---|
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
protected boolean enableSsl
protected boolean enableHttp2
protected javax.net.ssl.SSLContext sslContext
protected java.util.Set<java.lang.Integer> addHttpPorts
protected java.util.List<VxHttpServer> servers
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