org.codehaus.wadi.core.manager
Class StandardManager
java.lang.Object
org.codehaus.wadi.core.manager.StandardManager
- All Implemented Interfaces:
- Lifecycle, Manager
- Direct Known Subclasses:
- DistributableManager
public class StandardManager
- extends java.lang.Object
- implements Lifecycle, Manager
- Version:
- $Revision: 2415 $
- Author:
- Jules Gosnell
Fields inherited from interface org.codehaus.wadi.core.manager.Manager |
NAME |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StandardManager
public StandardManager(SessionFactory sessionFactory,
SessionIdFactory sessionIdFactory,
Contextualiser contextualiser,
ConcurrentMotableMap motableMap,
Router router,
SessionMonitor sessionMonitor)
init
public void init(ManagerConfig config)
- Description copied from interface:
Manager
- Initialise the Manager with information not readily available at construction time.
- Specified by:
init
in interface Manager
- Parameters:
config
- An object carrying configuration informations
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface Lifecycle
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface Lifecycle
- Throws:
java.lang.Exception
createWithName
public Session createWithName(java.lang.String name)
throws SessionAlreadyExistException
- Specified by:
createWithName
in interface Manager
- Throws:
SessionAlreadyExistException
create
public Session create(Invocation invocation)
- Description copied from interface:
Manager
- Create a new Session
- Specified by:
create
in interface Manager
- Parameters:
invocation
- the Invocation
- Returns:
- the Session
destroy
public void destroy(Session session)
- Description copied from interface:
Manager
- Destroy a Session
- Specified by:
destroy
in interface Manager
- Parameters:
session
- the Session
getMaxInactiveInterval
public int getMaxInactiveInterval()
- Specified by:
getMaxInactiveInterval
in interface Manager
- Returns:
- The maximum amount of time (in seconds) that a Session
may lie inactive (i.e. without receiving an Invocation) before it
should be garbage collected.
setMaxInactiveInterval
public void setMaxInactiveInterval(int interval)
- Specified by:
setMaxInactiveInterval
in interface Manager
getSessionIdFactory
public SessionIdFactory getSessionIdFactory()
- Specified by:
getSessionIdFactory
in interface Manager
- Returns:
- The factory responsible for the generation of Session IDs
triggerCallback
public void triggerCallback()
contextualise
public boolean contextualise(Invocation invocation)
throws InvocationException
- Description copied from interface:
Manager
- Contextualise an Invocation - somehow colocate the Invocation and the relevant Session within the same
JVM somewhere in the Cluster, give the Invocation the Session and invoke() it. The Manager possesses
a stack of Contextualisers, down which the Invocation is passed in order to achieve this.
- Specified by:
contextualise
in interface Manager
- Throws:
InvocationException
processStateful
protected boolean processStateful(Invocation invocation)
throws InvocationException
- Throws:
InvocationException
processStateless
protected boolean processStateless(Invocation invocation)
throws InvocationException
- Throws:
InvocationException
validateSessionName
protected boolean validateSessionName(java.lang.String name)
createSession
protected Session createSession(java.lang.String name)
onSessionCreation
protected void onSessionCreation(Session session)
onSessionDestruction
protected void onSessionDestruction(Session session)
Copyright © 2008. All Rights Reserved.