net.sourceforge.scopes.managers.impl
Class InitBasedApplicationScopeManager

java.lang.Object
  extended by net.sourceforge.scopes.managers.impl.ApplicationScopeManager
      extended by net.sourceforge.scopes.managers.impl.InitBasedApplicationScopeManager
All Implemented Interfaces:
ScopeManager<javax.servlet.http.HttpServletRequest>

public class InitBasedApplicationScopeManager
extends ApplicationScopeManager

Instead of getting the ServletContext from the request, this scope manager takes it from the filter configuration.
It is useful if you need the application scope even without a session.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.scopes.managers.impl.ApplicationScopeManager
ApplicationScopeManager.ServletContext
 
Constructor Summary
InitBasedApplicationScopeManager()
           
 
Method Summary
 void configure(java.lang.String scopeName, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Configures the scope manager before its real use.
 Context createContext(javax.servlet.http.HttpServletRequest request)
          Creates an application context bound to servlet context, given the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitBasedApplicationScopeManager

public InitBasedApplicationScopeManager()
Method Detail

configure

public void configure(java.lang.String scopeName,
                      java.util.Map<java.lang.String,java.lang.Object> parameters)
Description copied from interface: ScopeManager
Configures the scope manager before its real use.

Specified by:
configure in interface ScopeManager<javax.servlet.http.HttpServletRequest>
Overrides:
configure in class ApplicationScopeManager
Parameters:
scopeName - The scope name.
parameters - The map of parameters used to configure it.

createContext

public Context createContext(javax.servlet.http.HttpServletRequest request)
Description copied from class: ApplicationScopeManager
Creates an application context bound to servlet context, given the request.

Specified by:
createContext in interface ScopeManager<javax.servlet.http.HttpServletRequest>
Overrides:
createContext in class ApplicationScopeManager
Parameters:
request - The request to use.
Returns:
The created context.