Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jasper.runtime
Class TagHandlerPoolImpl

    java.lang.Object
      org.apache.jasper.runtime.TagHandlerPoolImpl

All Implemented Interfaces:
  TagHandlerPool

public class TagHandlerPoolImpl
extends java.lang.Object
implements TagHandlerPool

This class provides a basic implementation of TagHandlerPool. Its pooling strategy is to grow the pool so that a caller never has to wait for a tag handler. Therefore in the worst case, the pool size will be equal to the total number of concurently used tags (that are at the same reuse scope.) This implementation does not shrink the pool.

Author:
  Casey Lucas
See Also:
  `TagPoolManagerImpl`

Constructor Summary
`TagHandlerPoolImpl(java.lang.Class handlerClass, java.lang.String poolName)` Create a TagHandlerPoolImpl that will store objects of the given class type

Method Summary
`javax.servlet.jsp.tagext.Tag` | `getHandler()` Obtain a tag handler.
`void` | `releaseHandler(javax.servlet.jsp.tagext.Tag usedTag, boolean removeFromPool)` This method releases a tag handler obtained from getHandler.
`void` | `shutdown()` This method performs pool shutdown.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TagHandlerPoolImpl

    public TagHandlerPoolImpl(java.lang.Class handlerClass,
                              java.lang.String poolName)

  Create a TagHandlerPoolImpl that will store objects of the given class type

Parameters:
  `handlerClass` - tag handler class

Method Detail

### getHandler

    public javax.servlet.jsp.tagext.Tag getHandler()

  Obtain a tag handler. This implementation allocates one if one is not available. So the collection will grow with concurent tag handler use.

  Specified by:
    `getHandler` in interface `TagHandlerPool`
  Returns:
    tag handler

### releaseHandler

    public void releaseHandler(javax.servlet.jsp.tagext.Tag usedTag,
                               boolean removeFromPool)

  This method releases a tag handler obtained from getHandler. The JSP shouls always call this method after finished using a tag handler.

  Specified by:
    `releaseHandler` in interface `TagHandlerPool`
  Parameters:
    `usedTag` - tag previously obtained from getHandler
    `removeFromPool` - Set to true to remove handler from pool. One reason for this is an exception during tag processing.

### shutdown

    public void shutdown()

  This method performs pool shutdown. It will call Tag.release for all of its tag handlers.

  Specified by:
    `shutdown` in interface `TagHandlerPool`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. All Rights Reserved.