Package org.apache.catalina.session
Class StoreBase
java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.session.StoreBase
- Direct Known Subclasses:
- DataSourceStore,- FileStore
Abstract implementation of the 
Store interface to support most of the functionality required by a
 Store.- Author:
- Bip Thelin
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.catalina.LifecycleLifecycle.SingleUse
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected ManagerThe Manager with which this Store is associated.protected static final StringManagerThe string manager for this package.protected static final StringName to register for this Store, used for logging.protected final PropertyChangeSupportThe property change support for this component.Fields inherited from interface org.apache.catalina.LifecycleAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a property change listener to this component.protected voidSub-classes implement this method to perform any instance destruction required.String[]Get only those keys of sessions, that are saved in the Store and are to be expired.protected ObjectInputStreamCreate the object input stream to use to read a session from the store.protected voidSub-classes implement this method to perform any instance initialisation required.voidCalled by our background reaper thread to check if Sessions saved in our store are subject of being expired.voidRemove a property change listener from this component.voidsetManager(Manager manager) Set the Manager with which this Store is associated.protected voidStart this component and implement the requirements ofLifecycleBase.startInternal().protected voidStop this component and implement the requirements ofLifecycleBase.stopInternal().toString()Methods inherited from class org.apache.catalina.util.LifecycleBaseaddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
- 
Field Details- 
storeNameName to register for this Store, used for logging.- See Also:
 
- 
supportThe property change support for this component.
- 
smThe string manager for this package.
- 
managerThe Manager with which this Store is associated.
 
- 
- 
Constructor Details- 
StoreBasepublic StoreBase()
 
- 
- 
Method Details- 
getStoreName- Returns:
- the name for this Store, used for logging.
 
- 
setManagerSet the Manager with which this Store is associated.- Specified by:
- setManagerin interface- Store
- Parameters:
- manager- The newly associated Manager
 
- 
getManager- Specified by:
- getManagerin interface- Store
- Returns:
- the Manager with which the Store is associated.
 
- 
addPropertyChangeListenerAdd a property change listener to this component.- Specified by:
- addPropertyChangeListenerin interface- Store
- Parameters:
- listener- a value of type- PropertyChangeListener
 
- 
removePropertyChangeListenerRemove a property change listener from this component.- Specified by:
- removePropertyChangeListenerin interface- Store
- Parameters:
- listener- The listener to remove
 
- 
expiredKeysGet only those keys of sessions, that are saved in the Store and are to be expired.- Returns:
- list of session keys, that are to be expired
- Throws:
- IOException- if an input-/output error occurred
 
- 
processExpirespublic void processExpires()Called by our background reaper thread to check if Sessions saved in our store are subject of being expired. If so expire the Session and remove it from the Store.
- 
getObjectInputStreamCreate the object input stream to use to read a session from the store. Sub-classes must have set the thread context class loader before calling this method.- Parameters:
- is- The input stream provided by the sub-class that will provide the data for a session
- Returns:
- An appropriately configured ObjectInputStream from which the session can be read.
- Throws:
- IOException- if a problem occurs creating the ObjectInputStream
 
- 
initInternalprotected void initInternal()Description copied from class:LifecycleBaseSub-classes implement this method to perform any instance initialisation required.- Specified by:
- initInternalin class- LifecycleBase
 
- 
startInternalStart this component and implement the requirements ofLifecycleBase.startInternal().- Specified by:
- startInternalin class- LifecycleBase
- Throws:
- LifecycleException- if this component detects a fatal error that prevents this component from being used
 
- 
stopInternalStop this component and implement the requirements ofLifecycleBase.stopInternal().- Specified by:
- stopInternalin class- LifecycleBase
- Throws:
- LifecycleException- if this component detects a fatal error that prevents this component from being used
 
- 
destroyInternalprotected void destroyInternal()Description copied from class:LifecycleBaseSub-classes implement this method to perform any instance destruction required.- Specified by:
- destroyInternalin class- LifecycleBase
 
- 
toString
 
-