public abstract class HttpModule extends Attributes
Voovan Framework. WebSite: https://github.com/helyho/Voovan Licence: Apache v2 License
Constructor and Description |
---|
HttpModule() |
Modifier and Type | Method and Description |
---|---|
void |
connect(String routeRegexPath,
HttpRouter router)
CONNECT 请求
|
void |
delete(String routeRegexPath,
HttpRouter router)
DELETE 请求
|
Chain<HttpFilterConfig> |
filterChain()
获取过滤器链
|
void |
get(String routeRegexPath,
HttpRouter router)
GET 请求
|
HttpModuleConfig |
getModuleConfig()
获取HttpModuleConfig
|
Object |
getParamters(String name)
获取模块的配置参数
|
WebServer |
getWebServer()
获取WebServer
|
void |
head(String routeRegexPath,
HttpRouter router)
HEAD 请求
|
void |
init(WebServer webServer,
HttpModuleConfig moduleConfig)
初始化模块操作
|
abstract void |
install()
安装模块至 WebServer
|
protected void |
lifeCycleDestory()
加载并运模块行初始化类
|
protected void |
lifeCycleInit()
加载并运模块行初始化类
|
void |
options(String routeRegexPath,
HttpRouter router)
OPTIONS 请求
|
void |
otherMethod(String method,
String routeRegexPath,
HttpRouter router)
其他请求
|
void |
post(String routeRegexPath,
HttpRouter router)
POST 请求
|
void |
put(String routeRegexPath,
HttpRouter router)
PUT 请求
|
void |
socket(String routeRegexPath,
WebSocketRouter router)
WebSocket 服务
|
void |
trace(String routeRegexPath,
HttpRouter router)
TRACE 请求
|
abstract void |
unInstall()
安装模块至 WebServer
|
attributes, clearAttribute, containAttribute, getAttribute, isModifyed, removeAttribute, setAttribute, setModifyed
public WebServer getWebServer()
public HttpModuleConfig getModuleConfig()
public void init(WebServer webServer, HttpModuleConfig moduleConfig)
webServer
- WebServer对象moduleConfig
- 模块配置对象public void get(String routeRegexPath, HttpRouter router)
routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public void post(String routeRegexPath, HttpRouter router)
routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public void head(String routeRegexPath, HttpRouter router)
routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public void put(String routeRegexPath, HttpRouter router)
routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public void delete(String routeRegexPath, HttpRouter router)
routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public void trace(String routeRegexPath, HttpRouter router)
routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public void connect(String routeRegexPath, HttpRouter router)
routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public void options(String routeRegexPath, HttpRouter router)
routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public void otherMethod(String method, String routeRegexPath, HttpRouter router)
method
- 请求方法routeRegexPath
- 匹配路径router
- HTTP处理请求句柄public Chain<HttpFilterConfig> filterChain()
public void socket(String routeRegexPath, WebSocketRouter router)
routeRegexPath
- 匹配路径router
- WebSocket处理句柄protected void lifeCycleInit()
protected void lifeCycleDestory()
public abstract void install()
public abstract void unInstall()
Copyright © 2020 Voovan. All rights reserved.