public class VxHttpServerComb extends java.lang.Object implements HttpServerConfigure, ServerLifecycle
| 限定符和类型 | 字段和说明 |
|---|---|
protected AppContext |
context |
protected HttpServerProps |
props |
| 构造器和说明 |
|---|
VxHttpServerComb(HttpServerProps props,
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, waitenableDebug, enableSsl, isSupportedHttp2protected final AppContext context
protected final HttpServerProps props
public VxHttpServerComb(HttpServerProps props, AppContext context)
public void enableSsl(boolean enable,
javax.net.ssl.SSLContext sslContext)
HttpServerConfigureenableSsl 在接口中 HttpServerConfigurepublic void enableHttp2(boolean enable)
HttpServerConfigureenableHttp2 在接口中 HttpServerConfigurepublic void addHttpPort(int port)
addHttpPort 在接口中 HttpServerConfigurepublic void setHandler(Handler handler)
public void setExecutor(java.util.concurrent.Executor executor)
HttpServerConfiguresetExecutor 在接口中 HttpServerConfigurepublic void enableWebSocket(boolean enableWebSocket)
public 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