public class PropertiesCacheManager extends CacheManager implements Handler, java.io.Serializable
Classes that are not properties files may implement "Saveable", which has the store() and load() methods from Properties; they are expected to generate and restore the state of the object in Properties format.
This handler/sessionManager can take an ascii-readable "snapshot" of the server state, for all state that is a java properties object (or implements Saveable). It doesn't perturb the existing state.
Properties:
| Modifier and Type | Class and Description |
|---|---|
static interface |
PropertiesCacheManager.Saveable
This interface allows for persistence of non-properties session objects.
|
sessions| Constructor and Description |
|---|
PropertiesCacheManager() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
getObj(java.lang.Object session,
java.lang.Object ident)
If we have deferred session loading, check here and get it!
|
boolean |
init(Server server,
java.lang.String prefix)
Install this class as the session manager.
|
boolean |
respond(Request request)
Don't handle any URL requests (yet)
|
flush, makeKey, putObj, putObj, removeObjget, getSession, put, remove, setSessionManagerpublic boolean init(Server server, java.lang.String prefix)
CacheManagerinit in interface Handlerinit in class CacheManagerserver - The HTTP server that created this Handler.
Typical Handlers will use Server.props
to obtain run-time configuration information.prefix - The handlers name.
The string this Handler may prepend to all
of the keys that it uses to extract configuration information
from Server.props. This is set (by the Server
and ChainHandler) to help avoid configuration parameter
namespace collisions.true if this Handler initialized
successfully, false otherwise. If
false is returned, this Handler
should not be used.public boolean respond(Request request)
CacheManagerrespond in interface Handlerrespond in class CacheManagerrequest - The Request object that represents the HTTP
request.true if the request was handled. A request was
handled if a response was supplied to the client, typically
by calling Request.sendResponse() or
Request.sendError.protected java.lang.Object getObj(java.lang.Object session,
java.lang.Object ident)
getObj in class CacheManager