public class PerThreadTagHandlerPool extends TagHandlerPool
| Modifier and Type | Class and Description |
|---|---|
private static class |
PerThreadTagHandlerPool.PerThreadData |
| Modifier and Type | Field and Description |
|---|---|
private int |
maxSize |
private java.lang.ThreadLocal<PerThreadTagHandlerPool.PerThreadData> |
perThread |
private java.util.Vector<PerThreadTagHandlerPool.PerThreadData> |
perThreadDataVector |
OPTION_MAXSIZE, OPTION_TAGPOOL| Constructor and Description |
|---|
PerThreadTagHandlerPool()
Constructs a tag handler pool with the default capacity.
|
| Modifier and Type | Method and Description |
|---|---|
Tag |
get(java.lang.Class handlerClass)
Gets the next available tag handler from this tag handler pool,
instantiating one if this tag handler pool is empty.
|
protected void |
init(javax.servlet.ServletConfig config) |
void |
release()
Calls the release() method of all tag handlers in this tag handler pool.
|
void |
reuse(Tag 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.
|
getOption, getTagHandlerPoolprivate int maxSize
private java.util.Vector<PerThreadTagHandlerPool.PerThreadData> perThreadDataVector
private java.lang.ThreadLocal<PerThreadTagHandlerPool.PerThreadData> perThread
public PerThreadTagHandlerPool()
protected void init(javax.servlet.ServletConfig config)
init in class TagHandlerPoolpublic Tag get(java.lang.Class handlerClass)
throws javax.servlet.jsp.JspException
get in class TagHandlerPoolhandlerClass - Tag handler classjavax.servlet.jsp.JspException - if a tag handler cannot be instantiatedpublic void reuse(Tag handler)
reuse in class TagHandlerPoolhandler - Tag handler to add to this tag handler poolpublic void release()
release in class TagHandlerPool