public class DefaultHttpRequestHandler extends Object implements org.tio.http.common.handler.HttpRequestHandler
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.tio.http.common.HttpConfig |
httpConfig |
protected Routes |
routes |
| 构造器和说明 |
|---|
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Class<?> scanRootClasse) |
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Class<?>[] scanRootClasses) |
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Class<?>[] scanRootClasses,
ControllerFactory controllerFactory) |
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Class<?> scanRootClasse,
ControllerFactory controllerFactory) |
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Routes routes) |
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
String scanPackage) |
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
String[] scanPackages) |
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
String[] scanPackages,
ControllerFactory controllerFactory) |
DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
String scanPackage,
ControllerFactory controllerFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearStaticResCache() |
org.tio.http.common.session.HttpSession |
createSession(org.tio.http.common.HttpRequest request)
创建httpsession
|
static String |
getDomain(org.tio.http.common.HttpRequest request) |
org.tio.http.common.HttpConfig |
getHttpConfig(org.tio.http.common.HttpRequest request) |
HttpServerInterceptor |
getHttpServerInterceptor() |
HttpSessionListener |
getHttpSessionListener() |
IpPathAccessStats |
getIpPathAccessStats() |
static org.tio.http.common.Cookie |
getSessionCookie(org.tio.http.common.HttpRequest request,
org.tio.http.common.HttpConfig httpConfig) |
SessionCookieDecorator |
getSessionCookieDecorator() |
static String |
getSessionId(org.tio.http.common.HttpRequest request) |
org.tio.utils.cache.caffeine.CaffeineCache |
getStaticResCache() |
ThrowableHandler |
getThrowableHandler() |
TokenPathAccessStats |
getTokenPathAccessStats() |
org.tio.http.common.HttpResponse |
handler(org.tio.http.common.HttpRequest request) |
boolean |
isCompatibilityAssignment() |
void |
monitorFileChanged()
扫描文件变化
|
org.tio.http.common.HttpResponse |
resp404(org.tio.http.common.HttpRequest request,
org.tio.http.common.RequestLine requestLine) |
org.tio.http.common.HttpResponse |
resp500(org.tio.http.common.HttpRequest request,
org.tio.http.common.RequestLine requestLine,
Throwable throwable) |
void |
setCompatibilityAssignment(boolean compatibilityAssignment) |
void |
setHttpConfig(org.tio.http.common.HttpConfig httpConfig) |
void |
setHttpServerInterceptor(HttpServerInterceptor httpServerInterceptor) |
void |
setHttpSessionListener(HttpSessionListener httpSessionListener) |
void |
setIpPathAccessStats(IpPathAccessStats ipPathAccessStats) |
void |
setSessionCookieDecorator(SessionCookieDecorator sessionCookieDecorator) |
void |
setStaticResCache(org.tio.utils.cache.caffeine.CaffeineCache staticResCache) |
void |
setThrowableHandler(ThrowableHandler throwableHandler) |
void |
setTokenPathAccessStats(TokenPathAccessStats tokenPathAccessStats) |
org.tio.http.common.session.HttpSession |
updateSessionId(org.tio.http.common.HttpRequest request,
org.tio.http.common.session.HttpSession httpSession,
org.tio.http.common.HttpResponse httpResponse)
更新sessionId
|
protected org.tio.http.common.HttpConfig httpConfig
protected Routes routes
public DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Class<?> scanRootClasse)
throws Exception
httpConfig - scanRootClasse - Exceptionpublic DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Class<?> scanRootClasse,
ControllerFactory controllerFactory)
throws Exception
httpConfig - scanRootClasse - controllerFactory - Exceptionpublic DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Class<?>[] scanRootClasses)
throws Exception
httpConfig - scanRootClasses - Exceptionpublic DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
Class<?>[] scanRootClasses,
ControllerFactory controllerFactory)
throws Exception
httpConfig - scanRootClasses - controllerFactory - Exceptionpublic DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
String scanPackage)
throws Exception
httpConfig - scanPackage - Exceptionpublic DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
String scanPackage,
ControllerFactory controllerFactory)
throws Exception
httpConfig - scanPackage - controllerFactory - Exceptionpublic DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
String[] scanPackages)
throws Exception
httpConfig - scanPackages - Exceptionpublic DefaultHttpRequestHandler(org.tio.http.common.HttpConfig httpConfig,
String[] scanPackages,
ControllerFactory controllerFactory)
throws Exception
httpConfig - scanPackages - controllerFactory - Exceptionpublic org.tio.http.common.session.HttpSession createSession(org.tio.http.common.HttpRequest request)
public org.tio.http.common.HttpConfig getHttpConfig(org.tio.http.common.HttpRequest request)
getHttpConfig 在接口中 org.tio.http.common.handler.HttpRequestHandlerpublic HttpServerInterceptor getHttpServerInterceptor()
public static org.tio.http.common.Cookie getSessionCookie(org.tio.http.common.HttpRequest request,
org.tio.http.common.HttpConfig httpConfig)
public org.tio.utils.cache.caffeine.CaffeineCache getStaticResCache()
public org.tio.http.common.HttpResponse handler(org.tio.http.common.HttpRequest request)
throws Exception
handler 在接口中 org.tio.http.common.handler.HttpRequestHandlerExceptionpublic static String getDomain(org.tio.http.common.HttpRequest request)
public org.tio.http.common.session.HttpSession updateSessionId(org.tio.http.common.HttpRequest request,
org.tio.http.common.session.HttpSession httpSession,
org.tio.http.common.HttpResponse httpResponse)
request - httpSession - httpResponse - public static String getSessionId(org.tio.http.common.HttpRequest request)
public org.tio.http.common.HttpResponse resp404(org.tio.http.common.HttpRequest request,
org.tio.http.common.RequestLine requestLine)
throws Exception
resp404 在接口中 org.tio.http.common.handler.HttpRequestHandlerExceptionpublic org.tio.http.common.HttpResponse resp500(org.tio.http.common.HttpRequest request,
org.tio.http.common.RequestLine requestLine,
Throwable throwable)
throws Exception
resp500 在接口中 org.tio.http.common.handler.HttpRequestHandlerExceptionpublic void setHttpConfig(org.tio.http.common.HttpConfig httpConfig)
httpConfig - the httpConfig to setpublic void setHttpServerInterceptor(HttpServerInterceptor httpServerInterceptor)
public void setStaticResCache(org.tio.utils.cache.caffeine.CaffeineCache staticResCache)
staticResCache - the staticResCache to setpublic void clearStaticResCache()
clearStaticResCache 在接口中 org.tio.http.common.handler.HttpRequestHandlerpublic HttpSessionListener getHttpSessionListener()
public void setHttpSessionListener(HttpSessionListener httpSessionListener)
public SessionCookieDecorator getSessionCookieDecorator()
public void setSessionCookieDecorator(SessionCookieDecorator sessionCookieDecorator)
public IpPathAccessStats getIpPathAccessStats()
public void setIpPathAccessStats(IpPathAccessStats ipPathAccessStats)
public ThrowableHandler getThrowableHandler()
public void setThrowableHandler(ThrowableHandler throwableHandler)
public TokenPathAccessStats getTokenPathAccessStats()
public void setTokenPathAccessStats(TokenPathAccessStats tokenPathAccessStats)
public boolean isCompatibilityAssignment()
public void setCompatibilityAssignment(boolean compatibilityAssignment)
Copyright © 2022. All rights reserved.