public class JRadiusSessionManager extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, net.sf.ehcache.event.CacheEventListener
| Constructor and Description |
|---|
JRadiusSessionManager()
Creates a new JRadiusSessionManager instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Object |
clone() |
void |
dispose() |
org.springframework.context.ApplicationContext |
getApplicationContext() |
net.sf.ehcache.CacheManager |
getCacheManager() |
String |
getCacheName() |
static JRadiusSessionManager |
getManager(Object name)
There is a single JRadiusSessionManager available that
is accessible through this method.
|
int |
getMaxInactiveInterval() |
int |
getMinInterimInterval() |
JRadiusSession |
getSession(JRadiusRequest request)
Returns a session object.
|
JRadiusSession |
getSession(JRadiusRequest request,
Serializable key) |
net.sf.ehcache.Ehcache |
getSessionCache() |
SessionFactory |
getSessionFactory(Object name)
returns the session manager's session factory
|
SessionKeyProvider |
getSessionKeyProvider(Object name)
returns the session manager's key provider
|
void |
lock(JRadiusSession session) |
JRadiusLogEntry |
newLogEntry(JRadiusEvent event,
JRadiusSession session,
String packetId) |
JRadiusSession |
newSession(JRadiusRequest request,
Object key) |
void |
notifyElementEvicted(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element) |
void |
notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element) |
void |
notifyElementPut(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element) |
void |
notifyElementRemoved(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element) |
void |
notifyElementUpdated(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element) |
void |
notifyRemoveAll(net.sf.ehcache.Ehcache cache) |
void |
rehashSession(JRadiusSession session,
Serializable okey,
Serializable nkey) |
void |
removeSession(JRadiusSession session) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setCacheManager(net.sf.ehcache.CacheManager cacheManager) |
void |
setCacheName(String cacheName) |
void |
setEventDispatcher(EventDispatcher eventDispatcher) |
static JRadiusSessionManager |
setManager(String name,
JRadiusSessionManager manager) |
void |
setMaxInactiveInterval(int maxInactiveInterval) |
void |
setMinInterimInterval(int minInterimInterval) |
void |
setSessionCache(net.sf.ehcache.Cache sessionCache) |
void |
setSessionFactory(String name,
SessionFactory factory)
Sets the session factory for this session manager.
|
void |
setSessionKeyProvider(String name,
SessionKeyProvider provider)
Sets the key provider for this session manager.
|
void |
shutdown() |
static void |
shutdownManagers() |
void |
unlock(JRadiusSession session,
boolean save) |
public JRadiusSessionManager()
public static JRadiusSessionManager getManager(Object name)
public static JRadiusSessionManager setManager(String name, JRadiusSessionManager manager)
public static void shutdownManagers()
public void shutdown()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setSessionKeyProvider(String name, SessionKeyProvider provider)
name - The name of the SessionKeyProvider (null for default)provider - The SessionKeyProviderSessionKeyProviderpublic void setSessionFactory(String name, SessionFactory factory)
name - The name of the SessionFactory (null for default)factory - a SessionFactorySessionFactorypublic SessionKeyProvider getSessionKeyProvider(Object name)
name - The name of the SessionKeyProvider (null for default)public SessionFactory getSessionFactory(Object name)
name - The name of the SessionFactory (null for default)public JRadiusSession getSession(JRadiusRequest request) throws RadiusException
request - a JRadiusRequest used to retrieve or generate a session withRadiusExceptionpublic void rehashSession(JRadiusSession session, Serializable okey, Serializable nkey) throws RadiusException
RadiusExceptionpublic JRadiusSession newSession(JRadiusRequest request, Object key) throws RadiusException
RadiusExceptionpublic JRadiusSession getSession(JRadiusRequest request, Serializable key) throws RadiusException
RadiusExceptionpublic void lock(JRadiusSession session)
public void unlock(JRadiusSession session, boolean save)
public JRadiusLogEntry newLogEntry(JRadiusEvent event, JRadiusSession session, String packetId)
public void removeSession(JRadiusSession session)
public int getMaxInactiveInterval()
public void setMaxInactiveInterval(int maxInactiveInterval)
public int getMinInterimInterval()
public void setMinInterimInterval(int minInterimInterval)
public net.sf.ehcache.CacheManager getCacheManager()
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
public String getCacheName()
public void setCacheName(String cacheName)
public void dispose()
dispose in interface net.sf.ehcache.event.CacheEventListenerpublic void notifyElementEvicted(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
notifyElementEvicted in interface net.sf.ehcache.event.CacheEventListenerpublic void notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
notifyElementExpired in interface net.sf.ehcache.event.CacheEventListenerpublic void notifyElementPut(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
throws net.sf.ehcache.CacheException
notifyElementPut in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheExceptionpublic void notifyElementRemoved(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
throws net.sf.ehcache.CacheException
notifyElementRemoved in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheExceptionpublic void notifyElementUpdated(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
throws net.sf.ehcache.CacheException
notifyElementUpdated in interface net.sf.ehcache.event.CacheEventListenernet.sf.ehcache.CacheExceptionpublic void notifyRemoveAll(net.sf.ehcache.Ehcache cache)
notifyRemoveAll in interface net.sf.ehcache.event.CacheEventListenerpublic Object clone() throws CloneNotSupportedException
clone in interface net.sf.ehcache.event.CacheEventListenerclone in class ObjectCloneNotSupportedExceptionpublic net.sf.ehcache.Ehcache getSessionCache()
public void setSessionCache(net.sf.ehcache.Cache sessionCache)
public void setEventDispatcher(EventDispatcher eventDispatcher)
public org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwareCopyright © 2017. All rights reserved.