net.spy.jwebkit.cache
Class MemcachedContextListener
java.lang.Object
net.spy.SpyObject
net.spy.jwebkit.cache.MemcachedContextListener
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.ServletContextListener
public class MemcachedContextListener
- extends net.spy.SpyObject
- implements javax.servlet.ServletContextListener
Provide memcached from a servlet context.
Uses the memcached.servers context init parameter as a list of
servers to communicate with.
|
Field Summary |
static java.lang.String |
CTX_NAME
Name of the context attribute containing the memcached client. |
|
Method Summary |
void |
contextDestroyed(javax.servlet.ServletContextEvent sce)
|
void |
contextInitialized(javax.servlet.ServletContextEvent sce)
|
static net.spy.memcached.MemcachedClient |
getClient(javax.servlet.ServletContext ctx)
Get the memcached client contained in the given context. |
| Methods inherited from class net.spy.SpyObject |
getLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CTX_NAME
public static final java.lang.String CTX_NAME
- Name of the context attribute containing the memcached client.
MemcachedContextListener
public MemcachedContextListener()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
getClient
public static net.spy.memcached.MemcachedClient getClient(javax.servlet.ServletContext ctx)
- Get the memcached client contained in the given context.
Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.