org.codehaus.wadi.impl
Class StandardManager

java.lang.Object
  extended byorg.codehaus.wadi.impl.StandardManager
All Implemented Interfaces:
Config, ContextualiserConfig, Lifecycle, RouterConfig, SessionConfig
Direct Known Subclasses:
DistributableManager

public class StandardManager
extends Object
implements Lifecycle, SessionConfig, ContextualiserConfig, RouterConfig

TODO - JavaDoc this type

Version:
$Revision: 1430 $
Author:
Jules Gosnell

Field Summary
protected  SynchronizedBoolean _acceptingSessions
           
protected  HttpSessionAttributeListener[] _attributeListeners
           
protected  AttributesFactory _attributesFactory
           
protected  ManagerConfig _config
           
protected  Contextualiser _contextualiser
           
protected  SynchronizedInt _errorCounter
           
protected  boolean _errorIfSessionNotAcquired
           
protected  Filter _filter
           
protected  Log _log
           
protected  Map _map
           
protected  int _maxInactiveInterval
           
protected  Router _router
           
protected  SessionIdFactory _sessionIdFactory
           
protected  HttpSessionListener[] _sessionListeners
           
protected  SessionPool _sessionPool
           
protected  SessionWrapperFactory _sessionWrapperFactory
           
protected  boolean _started
           
protected  Timer _timer
           
protected  ValuePool _valuePool
           
 
Constructor Summary
StandardManager(SessionPool sessionPool, AttributesFactory attributesFactory, ValuePool valuePool, SessionWrapperFactory sessionWrapperFactory, SessionIdFactory sessionIdFactory, Contextualiser contextualiser, Map map, Router router, boolean errorIfSessionNotAcquired)
           
 
Method Summary
 void aboutToStop()
           
 Session create()
           
 void destroy()
           
 void destroy(Session session)
           
 void expire(Motable motable)
           
 SynchronizedBoolean getAcceptingSessions()
           
 HttpSessionAttributeListener[] getAttributeListeners()
           
 AttributesFactory getAttributesFactory()
           
 Contextualiser getContextualiser()
           
 boolean getDistributable()
           
 int getErrorCount()
           
 boolean getErrorIfSessionNotAcquired()
           
 Immoter getEvictionImmoter()
           
 int getHttpPort()
           
 StandardManager getManager()
           
 int getMaxInactiveInterval()
           
 Router getRouter()
           
 ServletContext getServletContext()
           
 String getSessionCookieDomain()
           
 String getSessionCookieName()
           
 String getSessionCookiePath(HttpServletRequest req)
           
 SessionIdFactory getSessionIdFactory()
           
 HttpSessionListener[] getSessionListeners()
           
 SessionPool getSessionPool()
           
 String getSessionUrlParamName()
           
 SessionWrapperFactory getSessionWrapperFactory()
           
 Timer getTimer()
           
 ValuePool getValuePool()
           
 void incrementErrorCounter()
           
 void init(ManagerConfig config)
           
 boolean isStarted()
           
protected  void notifySessionCreation(Session session)
           
 void notifySessionDeletion(String name)
           
protected  void notifySessionDestruction(Session session)
           
 void notifySessionInsertion(String name)
           
 void notifySessionRelocation(String name)
           
 void setAttributelisteners(HttpSessionAttributeListener[] attributeListeners)
           
 void setFilter(Filter filter)
           
 void setLastAccessedTime(Evictable evictable, long oldTime, long newTime)
           
 void setMaxInactiveInterval(Evictable evictable, int oldInterval, int newInterval)
           
 void setMaxInactiveInterval(int interval)
           
 void setSessionListeners(HttpSessionListener[] sessionListeners)
           
 void start()
           
 void stop()
           
protected  boolean validateSessionName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected final Log _log

_sessionPool

protected final SessionPool _sessionPool

_attributesFactory

protected final AttributesFactory _attributesFactory

_valuePool

protected final ValuePool _valuePool

_sessionWrapperFactory

protected final SessionWrapperFactory _sessionWrapperFactory

_sessionIdFactory

protected final SessionIdFactory _sessionIdFactory

_contextualiser

protected final Contextualiser _contextualiser

_map

protected final Map _map

_timer

protected final Timer _timer

_router

protected final Router _router

_errorIfSessionNotAcquired

protected final boolean _errorIfSessionNotAcquired

_acceptingSessions

protected final SynchronizedBoolean _acceptingSessions

_sessionListeners

protected HttpSessionListener[] _sessionListeners

_attributeListeners

protected HttpSessionAttributeListener[] _attributeListeners

_config

protected ManagerConfig _config

_started

protected boolean _started

_maxInactiveInterval

protected int _maxInactiveInterval

_filter

protected Filter _filter

_errorCounter

protected SynchronizedInt _errorCounter
Constructor Detail

StandardManager

public StandardManager(SessionPool sessionPool,
                       AttributesFactory attributesFactory,
                       ValuePool valuePool,
                       SessionWrapperFactory sessionWrapperFactory,
                       SessionIdFactory sessionIdFactory,
                       Contextualiser contextualiser,
                       Map map,
                       Router router,
                       boolean errorIfSessionNotAcquired)
Method Detail

init

public void init(ManagerConfig config)

isStarted

public boolean isStarted()

start

public void start()
           throws Exception
Specified by:
start in interface Lifecycle
Throws:
Exception

aboutToStop

public void aboutToStop()
                 throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Lifecycle
Throws:
Exception

notifySessionCreation

protected void notifySessionCreation(Session session)

notifySessionDestruction

protected void notifySessionDestruction(Session session)

destroy

public void destroy()

validateSessionName

protected boolean validateSessionName(String name)

create

public Session create()

destroy

public void destroy(Session session)
Specified by:
destroy in interface SessionConfig

getSessionListeners

public HttpSessionListener[] getSessionListeners()
Specified by:
getSessionListeners in interface SessionConfig

setSessionListeners

public void setSessionListeners(HttpSessionListener[] sessionListeners)

getAttributeListeners

public HttpSessionAttributeListener[] getAttributeListeners()
Specified by:
getAttributeListeners in interface SessionConfig

setAttributelisteners

public void setAttributelisteners(HttpSessionAttributeListener[] attributeListeners)

getServletContext

public ServletContext getServletContext()
Specified by:
getServletContext in interface SessionConfig

getAttributesFactory

public AttributesFactory getAttributesFactory()
Specified by:
getAttributesFactory in interface SessionConfig

getValuePool

public ValuePool getValuePool()
Specified by:
getValuePool in interface SessionConfig

getManager

public StandardManager getManager()

getSessionWrapperFactory

public SessionWrapperFactory getSessionWrapperFactory()
Specified by:
getSessionWrapperFactory in interface SessionConfig

getSessionIdFactory

public SessionIdFactory getSessionIdFactory()
Specified by:
getSessionIdFactory in interface SessionConfig

getMaxInactiveInterval

public int getMaxInactiveInterval()
Specified by:
getMaxInactiveInterval in interface SessionConfig

setMaxInactiveInterval

public void setMaxInactiveInterval(int interval)

setFilter

public void setFilter(Filter filter)

getDistributable

public boolean getDistributable()

getContextualiser

public Contextualiser getContextualiser()

setLastAccessedTime

public void setLastAccessedTime(Evictable evictable,
                                long oldTime,
                                long newTime)
Specified by:
setLastAccessedTime in interface SessionConfig

setMaxInactiveInterval

public void setMaxInactiveInterval(Evictable evictable,
                                   int oldInterval,
                                   int newInterval)
Specified by:
setMaxInactiveInterval in interface SessionConfig

expire

public void expire(Motable motable)
Specified by:
expire in interface ContextualiserConfig

getEvictionImmoter

public Immoter getEvictionImmoter()
Specified by:
getEvictionImmoter in interface ContextualiserConfig

getTimer

public Timer getTimer()
Specified by:
getTimer in interface ContextualiserConfig

getSessionPool

public SessionPool getSessionPool()
Specified by:
getSessionPool in interface ContextualiserConfig

getRouter

public Router getRouter()
Specified by:
getRouter in interface SessionConfig

getHttpPort

public int getHttpPort()

getSessionCookieName

public String getSessionCookieName()
Specified by:
getSessionCookieName in interface RouterConfig

getSessionCookiePath

public String getSessionCookiePath(HttpServletRequest req)
Specified by:
getSessionCookiePath in interface RouterConfig

getSessionCookieDomain

public String getSessionCookieDomain()
Specified by:
getSessionCookieDomain in interface RouterConfig

getSessionUrlParamName

public String getSessionUrlParamName()
Specified by:
getSessionUrlParamName in interface RouterConfig

getErrorIfSessionNotAcquired

public boolean getErrorIfSessionNotAcquired()

incrementErrorCounter

public void incrementErrorCounter()

getErrorCount

public int getErrorCount()

getAcceptingSessions

public SynchronizedBoolean getAcceptingSessions()

notifySessionInsertion

public void notifySessionInsertion(String name)
Specified by:
notifySessionInsertion in interface ContextualiserConfig

notifySessionDeletion

public void notifySessionDeletion(String name)
Specified by:
notifySessionDeletion in interface ContextualiserConfig

notifySessionRelocation

public void notifySessionRelocation(String name)
Specified by:
notifySessionRelocation in interface ContextualiserConfig


Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.