public abstract class AbstractTinyProcessor extends Object implements TinyProcessor
Modifier and Type | Field and Description |
---|---|
protected static Logger |
logger |
protected String |
processorName |
protected TinyProcessorConfig |
tinyProcessorConfig |
TINY_PROCESSOR
DEFAULT_PRECEDENCE, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AbstractTinyProcessor() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
customInit() |
void |
destroy()
处理器的销毁方法
|
protected String |
get(String param) |
protected Map<String,String> |
getInitParamMap() |
int |
getOrder()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
String |
getProcessorName()
获取处理器名称
|
void |
init(TinyProcessorConfig tinyProcessorConfig)
初始化方法
|
boolean |
isMatch(String urlString)
判断url是否匹配,如果匹配,返回True
|
void |
process(String urlString,
WebContext context)
处理方法
|
abstract void |
reallyProcess(String urlString,
WebContext context)
tinyprocessor的逻辑处理方法,由子类来完成
|
void |
setProcessorName(String processorName)
设置处理器名称
|
protected static Logger logger
protected String processorName
protected TinyProcessorConfig tinyProcessorConfig
public String getProcessorName()
TinyProcessor
getProcessorName
in interface TinyProcessor
public void setProcessorName(String processorName)
TinyProcessor
setProcessorName
in interface TinyProcessor
processorName
- 处理器名称public void init(TinyProcessorConfig tinyProcessorConfig) throws javax.servlet.ServletException
TinyProcessor
init
in interface TinyProcessor
tinyProcessorConfig
- 处理器配置对象javax.servlet.ServletException
protected abstract void customInit() throws javax.servlet.ServletException
javax.servlet.ServletException
public void destroy()
TinyProcessor
destroy
in interface TinyProcessor
public boolean isMatch(String urlString)
TinyProcessor
isMatch
in interface TinyProcessor
urlString
- 请求路径public void process(String urlString, WebContext context) throws javax.servlet.ServletException, IOException
TinyProcessor
process
in interface TinyProcessor
urlString
- 请求路径context
- 请求上下文javax.servlet.ServletException
IOException
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
public abstract void reallyProcess(String urlString, WebContext context) throws javax.servlet.ServletException, IOException
urlString
- context
- javax.servlet.ServletException
IOException
Copyright © 2006–2018 TinyGroup. All rights reserved.