org.apache.jasper.runtime
类 TagHandlerPool

java.lang.Object
  继承者 org.apache.jasper.runtime.TagHandlerPool
直接已知子类:
PerThreadTagHandlerPool

public class TagHandlerPool
extends Object

Pool of tag handlers that can be reused.

作者:
Jan Luehe

字段摘要
static String OPTION_MAXSIZE
           
static String OPTION_TAGPOOL
           
 
构造方法摘要
TagHandlerPool()
          Constructs a tag handler pool with the default capacity.
TagHandlerPool(int capacity)
          已过时。 Use static getTagHandlerPool
 
方法摘要
<T extends JspTag>
JspTag
get(Class<T> handlerClass)
          Gets the next available tag handler from this tag handler pool, instantiating one if this tag handler pool is empty.
protected static String getOption(ServletConfig config, String name, String defaultV)
           
static TagHandlerPool getTagHandlerPool(ServletConfig config)
           
protected  void init(ServletConfig config)
           
 void release()
          Calls the release() method of all available tag handlers in this tag handler pool.
 void reuse(JspTag handler)
          Adds the given tag handler to this tag handler pool, unless this tag handler pool has already reached its capacity, in which case the tag handler's release() method is called.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

OPTION_TAGPOOL

public static final String OPTION_TAGPOOL
另请参见:
常量字段值

OPTION_MAXSIZE

public static final String OPTION_MAXSIZE
另请参见:
常量字段值
构造方法详细信息

TagHandlerPool

public TagHandlerPool()
Constructs a tag handler pool with the default capacity.


TagHandlerPool

public TagHandlerPool(int capacity)
已过时。 Use static getTagHandlerPool

Constructs a tag handler pool with the given capacity.

参数:
capacity - Tag handler pool capacity
方法详细信息

getTagHandlerPool

public static TagHandlerPool getTagHandlerPool(ServletConfig config)

init

protected void init(ServletConfig config)

get

public <T extends JspTag> JspTag get(Class<T> handlerClass)
           throws JspException
Gets the next available tag handler from this tag handler pool, instantiating one if this tag handler pool is empty.

参数:
handlerClass - Tag handler class
返回:
Reused or newly instantiated tag handler
抛出:
JspException - if a tag handler cannot be instantiated

reuse

public void reuse(JspTag handler)
Adds the given tag handler to this tag handler pool, unless this tag handler pool has already reached its capacity, in which case the tag handler's release() method is called.

参数:
handler - JspTag handler to add to this tag handler pool

release

public void release()
Calls the release() method of all available tag handlers in this tag handler pool.


getOption

protected static String getOption(ServletConfig config,
                                  String name,
                                  String defaultV)


Copyright © 2013. All Rights Reserved.