public abstract class AbstractServerEngine extends Object implements ServerEngine
Modifier and Type | Field and Description |
---|---|
protected ServerConfig |
config |
protected HttpHandler |
handler |
Constructor and Description |
---|
AbstractServerEngine() |
Modifier and Type | Method and Description |
---|---|
AbstractServerEngine |
init(ServerConfig config)
初始化HTTP服务器
|
protected abstract void |
initEngine()
初始化引擎,实现逻辑中如果初始化完成,不再重新初始化
|
protected abstract void |
reset()
重置引擎
|
AbstractServerEngine |
setHandler(HttpHandler handler)
设置请求处理器
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRawEngine, start
protected ServerConfig config
protected HttpHandler handler
public AbstractServerEngine init(ServerConfig config)
ServerEngine
init
in interface ServerEngine
config
- 配置项public AbstractServerEngine setHandler(HttpHandler handler)
ServerEngine
setHandler
in interface ServerEngine
handler
- 请求处理器protected abstract void reset()
protected abstract void initEngine()
Copyright © 2025. All rights reserved.