| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.apache.jserv.JServSTMStore
This class is used to store a set of JServContexts for servlets which implement the javax.servlet.SingleThreadModel interface. It's a kind of pool designed to work with JServServletManager.
| Field Summary | |
| private  JServContext[] | allContextsWe need a copy of all the contexts, busy or free. | 
| private  JServContext[] | freeContextsThe array of free contexts. | 
| private  int | incrementCapacityThe increment capacity parameter. | 
| private  int | indexAllThe index in the allContextsarray. | 
| private  int | indexFreeThe index used in the array of free contexts. | 
| private  int | initialCapacityThe initial capacity of this store | 
| private  int | maximumCapacityThe maximum size of this pool. | 
| private  JServServletManager | servletManagerThe Servlet Manager which must create in behalf of us new servlet instances when needed. | 
| private  java.lang.String | servletNameThe name (or class name or ...) of the servlet stored here. | 
| Constructor Summary | |
| (package private) | JServSTMStore(Configurations confs,
              JServServletManager servletManager,
              java.lang.String servletName,
              JServSendError sendError,
              JServContext firstInstance)Constructs a store fill it with contexts. | 
| Method Summary | |
| private  void | addContext(JServSendError sendError)Add a new created context. | 
| (package private)  JServContext[] | clear()Return all the contexts stored here and clear the content of the pool. | 
| (package private)  JServContext | getContext(JServSendError sendError)Get a free context (servlet) from the pool. | 
| (package private)  javax.servlet.Servlet[] | getServlets()Return the servlets stored in this pool. | 
| (package private)  void | returnContext(JServContext context)Return a free context to the pool after it was used. | 
| (package private)  int | size()Return the number of total contexts stored in this poll. | 
| Methods inherited from class java.lang.Object | 
|  | 
| Field Detail | 
private JServServletManager servletManager
private java.lang.String servletName
private JServContext[] freeContexts
indexFree.private int indexFree
private JServContext[] allContexts
private int indexAll
allContexts array. This index is
 incremented as new instances are added. It also shows how many
 instances we have in this pool.private int initialCapacity
private int incrementCapacity
private int maximumCapacity
| Constructor Detail | 
JServSTMStore(Configurations confs,
              JServServletManager servletManager,
              java.lang.String servletName,
              JServSendError sendError,
              JServContext firstInstance)
        throws javax.servlet.ServletException
confs - Configuration parameters for this classservletManager -  servletName -  sendError -  firstInstance - An already created and inited
 instance of the servlet| Method Detail | 
private void addContext(JServSendError sendError)
                 throws javax.servlet.ServletException
sendError - The sendError handler to report errors.
JServContext getContext(JServSendError sendError)
                  throws javax.servlet.ServletException
sendError - The error handler used to report errors.void returnContext(JServContext context)
context - the context to freeint size()
javax.servlet.Servlet[] getServlets()
JServContext[] clear()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||