public abstract class AbstractTinyFilter extends Object implements TinyFilter
Modifier and Type | Field and Description |
---|---|
protected String |
filterName |
protected static Logger |
logger |
protected TinyFilterConfig |
tinyFilterConfig |
BASIC_FILTER_PRECEDENCE, BUFFERED_FILTER_PRECEDENCE, LAZY_COMMIT_FILTER_PRECEDENCE, PARSER_FILTER_PRECEDENCE, REWRITE_FILTER_PRECEDENCE, SESSION_FILTER_PRECEDENCE, SETLOCALE_FILTER_PRECEDENCE, TINY_FILTER, TINY_WRAPPER_FILTER
DEFAULT_PRECEDENCE, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AbstractTinyFilter() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
customInit()
由客户自定义初始化
|
void |
destroyTinyFilter()
tiny过滤器的销毁方法
|
protected String |
get(String param) |
protected WebContext |
getAlreadyWrappedContext(WebContext wrappedContext)
返回已经包装的上下文
|
String |
getFilterName()
返回tiny过滤器名称
|
int |
getOrder()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
protected void |
initContext(WebContext context) |
void |
initTinyFilter(TinyFilterConfig config)
tiny过滤器的初始化方法
|
boolean |
isMatch(String url)
tiny过滤器的匹配方法,此过滤器是否可以处理此请求路径
|
void |
setFilterName(String filterName)
设置tiny过滤器名称
|
WebContext |
wrapContext(WebContext wrappedContext)
获取包装的webcontext
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
postProcess, preProcess
protected static Logger logger
protected String filterName
protected TinyFilterConfig tinyFilterConfig
public void initTinyFilter(TinyFilterConfig config) throws javax.servlet.ServletException
TinyFilter
initTinyFilter
in interface TinyFilter
config
- tiny过滤器配置对象javax.servlet.ServletException
protected abstract void customInit()
public String getFilterName()
TinyFilter
getFilterName
in interface TinyFilter
public void setFilterName(String filterName)
TinyFilter
setFilterName
in interface TinyFilter
filterName
- 过滤器名称public void destroyTinyFilter()
TinyFilter
destroyTinyFilter
in interface TinyFilter
public boolean isMatch(String url)
TinyFilter
isMatch
in interface TinyFilter
url
- 请求路径public WebContext wrapContext(WebContext wrappedContext)
WebContextFactory
wrapContext
in interface WebContextFactory<WebContext>
protected void initContext(WebContext context)
protected WebContext getAlreadyWrappedContext(WebContext wrappedContext)
wrappedContext
- public int getOrder()
Ordered
Normally starting with 0 or 1, with Ordered.LOWEST_PRECEDENCE
indicating greatest. Same order values will result in arbitrary
positions for the affected objects.
Higher value can be interpreted as lower priority, consequently the first object has highest priority (somewhat analogous to Servlet "load-on-startup" values).
Note that order values below 0 are reserved for framework purposes. Application-specified values should always be 0 or greater, with only framework components (internal or third-party) supposed to use lower values.
getOrder
in interface Ordered
Ordered.LOWEST_PRECEDENCE
Copyright © 2006–2018 TinyGroup. All rights reserved.