|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A ServletFactoryListener is any Object that implements this interface and is interested in the events (and Objects) generated by a ServletFactory. Usually, a ServletFactoryListener is an Object that is using a ServletFactory to instantiate and initialize a servlet (or servlets) for it. We'll call that listener a "primary listener". But, ServletFactory and this Listener interface were written so any Object could also listen in to the events generated by a ServletFactory -- for monitoring reasons. Any listener that is simply monitoring the ServletFactory's activity in this way should be thought of as a "secondary listener". Primary listeners are instances of classes like ServletPool, that actually use the servlets that the ServletFactory is making. Any/all secondary listeners are just listening in. A ServletFactory will broadcast its events to all of its listeners.
Method Summary | |
int |
getCurrentServletCount()
The ServletFactory calls this method when it needs to know how many servlets that the primary listener (like a ServletPool or a ServletEntry) currently holds. |
int |
getMaxServletCount()
The ServletFactory calls this method when it needs to know the maximum number of servlets that the primary listener (like a ServletPool or a ServletEntry) will hold.. |
int |
getMinServletCount()
The ServletFactory calls this method when it needs to know how many servlets that the primary listener (like a ServletPool or a ServletEntry) needs to keep active and ready to serve. |
void |
handleServletFactoryEvent(ServletFactoryEvent servlet_factory_event)
The ServletFactory calls this method when it has either successfully instantiated and initialized a servlet (and the new servlet is ready to serve requests), or when the ServletFactory needs to signal the ServletFactoryListener(s) that some other event has occurred. |
Method Detail |
public int getMinServletCount()
public int getMaxServletCount()
public int getCurrentServletCount()
public void handleServletFactoryEvent(ServletFactoryEvent servlet_factory_event)
servlet_factory_event
- an EventObject subclass from the
ServletFactory that (in this case) encapsulates a new
servlet that is ready to serve requests.ServletFactoryEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |