public class SmHttpServerComb extends Object implements HttpServerConfigure, ServerLifecycle
| Modifier and Type | Field and Description |
|---|---|
protected Set<Integer> |
addHttpPorts |
protected int |
coreThreads |
protected boolean |
enableDebug |
protected boolean |
enableSsl |
protected boolean |
enableWebSocket |
protected org.noear.solon.core.handle.Handler |
handler |
protected HttpServerProps |
props |
protected List<SmHttpServer> |
servers |
protected SSLContext |
sslContext |
protected Executor |
workExecutor |
| Constructor and Description |
|---|
SmHttpServerComb(HttpServerProps props) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHttpPort(int port)
添加 HttpPort(当 ssl 时,可再开个 http 端口)
|
void |
enableDebug(boolean enable) |
void |
enableSsl(boolean enable,
SSLContext sslContext)
是否允许Ssl
|
void |
enableWebSocket(boolean enableWebSocket) |
boolean |
isSecure() |
void |
setCoreThreads(int coreThreads) |
void |
setExecutor(Executor executor) |
void |
setHandler(org.noear.solon.core.handle.Handler handler) |
void |
start(String host,
int port) |
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenableHttp2, enableSsl, isSupportedHttp2protected final HttpServerProps props
protected int coreThreads
protected Executor workExecutor
protected boolean enableWebSocket
protected org.noear.solon.core.handle.Handler handler
protected boolean enableSsl
protected SSLContext sslContext
protected boolean enableDebug
protected List<SmHttpServer> servers
public SmHttpServerComb(HttpServerProps props)
public void enableSsl(boolean enable,
SSLContext sslContext)
enableSsl in interface HttpServerConfigurepublic void enableDebug(boolean enable)
enableDebug in interface HttpServerConfigurepublic void addHttpPort(int port)
addHttpPort in interface HttpServerConfigurepublic void setHandler(org.noear.solon.core.handle.Handler handler)
public void setCoreThreads(int coreThreads)
public void setExecutor(Executor executor)
setExecutor in interface HttpServerConfigurepublic void enableWebSocket(boolean enableWebSocket)
public boolean isSecure()
public void start(String host, int port) throws Throwable
start in interface ServerLifecycleThrowablepublic void stop()
throws Throwable
stop in interface ServerLifecycleThrowableCopyright © 2025. All rights reserved.