模块 org.redkale
程序包 org.redkale.net
类 DispatcherServlet<K extends Serializable,C extends Context,R extends Request<C>,P extends Response<C,R>,S extends Servlet<C,R,P>>
- java.lang.Object
-
- org.redkale.net.Servlet<C,R,P>
-
- org.redkale.net.DispatcherServlet<K,C,R,P,S>
-
- 类型参数:
K
- SessionID的类型C
- Context的子类型R
- Request的子类型P
- Response的子类型S
- Servlet的子类型
public abstract class DispatcherServlet<K extends Serializable,C extends Context,R extends Request<C>,P extends Response<C,R>,S extends Servlet<C,R,P>> extends Servlet<C,R,P>
根Servlet, 一个Server只能存在一个根Servlet 由之前PrepareServlet更名而来,since 2.7.0 用于分发Request请求详情见: https://redkale.org
- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 protected Application
application
protected ReentrantLock
filtersLock
protected Filter<C,R,P>
headFilter
-
从类继承的字段 org.redkale.net.Servlet
_nonBlocking
-
-
构造器概要
构造器 限定符 构造器 说明 protected
DispatcherServlet()
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 void
addFilter(Filter<C,R,P> filter, AnyValue conf)
abstract void
addServlet(S servlet, Object attachment, AnyValue conf, K... mappings)
boolean
containsFilter(Class<? extends Filter> filterClass)
boolean
containsFilter(String filterClassName)
boolean
containsServlet(Class<? extends S> servletClass)
boolean
containsServlet(String servletClassName)
void
destroy(C context, AnyValue config)
void
dispatch(R request, P response)
protected void
doAfterRemove(S servlet)
protected void
forEachMappingKey(BiConsumer<K,S> consumer)
Long
getExecuteCounter()
protected AnyValue
getFilterConf(Filter filter)
<T extends Filter<C,R,P>>
List<T>getFilters()
Long
getIllRequestCounter()
protected AnyValue
getServletConf(Servlet servlet)
List<S>
getServlets()
protected void
incrExecuteCounter()
protected void
incrIllegalRequestCounter()
void
init(C context, AnyValue config)
protected S
mappingServlet(K key)
protected void
putMapping(K key, S servlet)
protected void
putServlet(S servlet)
<T extends Filter<C,R,P>>
TremoveFilter(Class<T> filterClass)
<T extends Filter<C,R,P>>
TremoveFilter(Predicate<T> predicate)
protected void
removeMapping(K key)
protected void
removeMapping(S servlet)
protected void
removeServlet(S servlet)
protected Stream<S>
servletStream()
protected void
setFilterConf(Filter filter, AnyValue conf)
protected void
setServletConf(Servlet servlet, AnyValue conf)
-
从类继承的方法 org.redkale.net.Servlet
execute, isNonBlocking
-
-
-
-
方法详细资料
-
incrExecuteCounter
protected void incrExecuteCounter()
-
incrIllegalRequestCounter
protected void incrIllegalRequestCounter()
-
putServlet
protected void putServlet(S servlet)
-
removeServlet
protected void removeServlet(S servlet)
-
containsServlet
public boolean containsServlet(String servletClassName)
-
removeMapping
protected void removeMapping(K key)
-
removeMapping
protected void removeMapping(S servlet)
-
doAfterRemove
protected void doAfterRemove(S servlet)
-
forEachMappingKey
protected void forEachMappingKey(BiConsumer<K,S> consumer)
-
containsFilter
public boolean containsFilter(String filterClassName)
-
addServlet
public abstract void addServlet(S servlet, Object attachment, AnyValue conf, K... mappings)
-
getExecuteCounter
public Long getExecuteCounter()
-
getIllRequestCounter
public Long getIllRequestCounter()
-
-