org.nanocontainer.nanowar
Class ServletContainerFinder
java.lang.Object
org.nanocontainer.nanowar.ServletContainerFinder
- public class ServletContainerFinder
- extends Object
ServletContainerFinder looks up a scoped PicoContainer in a web context. By
default, it looks in succession in the request, session and application
scopes. This class may be extended the
findContainer(HttpServletRequest)
overridden
to provide different lookup criteria or priority.
- Author:
- Stephen Molitor, Mauro Talevi
Method Summary |
org.picocontainer.PicoContainer |
findContainer(javax.servlet.http.HttpServletRequest request)
Looks for a PicoContainer in succession in the request, session and
application scopes of an HttpServletRequest. |
protected org.picocontainer.MutablePicoContainer |
getApplicationContainer(javax.servlet.ServletContext context)
|
protected org.picocontainer.MutablePicoContainer |
getRequestContainer(javax.servlet.ServletRequest request)
|
protected org.picocontainer.MutablePicoContainer |
getSessionContainer(javax.servlet.http.HttpSession session)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletContainerFinder
public ServletContainerFinder()
findContainer
public org.picocontainer.PicoContainer findContainer(javax.servlet.http.HttpServletRequest request)
throws org.picocontainer.PicoInitializationException
- Looks for a PicoContainer in succession in the request, session and
application scopes of an HttpServletRequest.
- Parameters:
request
- the HttpServletRequest
- Returns:
- A MutablePicoContainer
- Throws:
org.picocontainer.PicoInitializationException
getApplicationContainer
protected org.picocontainer.MutablePicoContainer getApplicationContainer(javax.servlet.ServletContext context)
getSessionContainer
protected org.picocontainer.MutablePicoContainer getSessionContainer(javax.servlet.http.HttpSession session)
getRequestContainer
protected org.picocontainer.MutablePicoContainer getRequestContainer(javax.servlet.ServletRequest request)
Copyright © 2003-2006 Codehaus. All Rights Reserved.