public class SmHttpServer extends Object implements ServerLifecycle
| Modifier and Type | Field and Description |
|---|---|
protected int |
coreThreads |
protected boolean |
enableDebug |
protected boolean |
enableWebSocket |
protected org.noear.solon.core.handle.Handler |
handler |
protected boolean |
isSecure |
protected HttpServerProps |
props |
protected org.smartboot.http.server.HttpBootstrap |
server |
protected SslConfig |
sslConfig |
protected Executor |
workExecutor |
| Constructor and Description |
|---|
SmHttpServer(HttpServerProps props) |
| Modifier and Type | Method and Description |
|---|---|
void |
enableDebug(boolean enable) |
void |
enableSsl(boolean enable,
SSLContext sslContext) |
void |
enableWebSocket(boolean enableWebSocket) |
boolean |
isSecure() |
void |
setCoreThreads(int coreThreads) |
void |
setHandler(org.noear.solon.core.handle.Handler handler) |
void |
setWorkExecutor(Executor executor) |
void |
start(String host,
int port) |
void |
stop() |
protected final HttpServerProps props
protected org.smartboot.http.server.HttpBootstrap server
protected org.noear.solon.core.handle.Handler handler
protected int coreThreads
protected Executor workExecutor
protected boolean enableWebSocket
protected SslConfig sslConfig
protected boolean enableDebug
protected boolean isSecure
public SmHttpServer(HttpServerProps props)
public boolean isSecure()
public void enableSsl(boolean enable,
@Nullable
SSLContext sslContext)
public void enableDebug(boolean enable)
public void enableWebSocket(boolean enableWebSocket)
public void setHandler(org.noear.solon.core.handle.Handler handler)
public void setWorkExecutor(Executor executor)
public void setCoreThreads(int coreThreads)
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.