org.apache.catalina.session

Class StoreBase

public abstract class StoreBase extends Object implements Lifecycle, Store

Abstract implementation of the Store interface to support most of the functionality required by a Store.

Version: $Revision: 898379 $, $Date: 2010-01-12 16:39:19 +0100 (Tue, 12 Jan 2010) $

Author: Bip Thelin

Field Summary
protected static Stringinfo
The descriptive information about this implementation.
protected LifecycleSupportlifecycle
The lifecycle event support for this component.
protected Managermanager
The Manager with which this JDBCStore is associated.
protected StringManagersm
The string manager for this package.
protected booleanstarted
Has this component been started yet?
protected static StringstoreName
Name to register for this Store, used for logging.
protected PropertyChangeSupportsupport
The property change support for this component.
Method Summary
voidaddLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.
voidaddPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.
LifecycleListener[]findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle.
StringgetInfo()
Return the info for this Store.
ManagergetManager()
Return the Manager with which the Store is associated.
StringgetStoreName()
Return the name for this Store, used for logging.
voidprocessExpires()
Called by our background reaper thread to check if Sessions saved in our store are subject of being expired.
voidremoveLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.
voidremovePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.
voidsetManager(Manager manager)
Set the Manager with which this Store is associated.
voidstart()
Prepare for the beginning of active use of the public methods of this component.
voidstop()
Gracefully terminate the active use of the public methods of this component.

Field Detail

info

protected static String info
The descriptive information about this implementation.

lifecycle

protected LifecycleSupport lifecycle
The lifecycle event support for this component.

manager

protected Manager manager
The Manager with which this JDBCStore is associated.

sm

protected StringManager sm
The string manager for this package.

started

protected boolean started
Has this component been started yet?

storeName

protected static String storeName
Name to register for this Store, used for logging.

support

protected PropertyChangeSupport support
The property change support for this component.

Method Detail

addLifecycleListener

public void addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.

Parameters: listener The listener to add

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.

Parameters: listener a value of type 'PropertyChangeListener'

findLifecycleListeners

public LifecycleListener[] findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.

getInfo

public String getInfo()
Return the info for this Store.

getManager

public Manager getManager()
Return the Manager with which the Store is associated.

getStoreName

public String getStoreName()
Return the name for this Store, used for logging.

processExpires

public 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.

removeLifecycleListener

public void removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.

Parameters: listener The listener to add

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.

Parameters: listener The listener to remove

setManager

public void setManager(Manager manager)
Set the Manager with which this Store is associated.

Parameters: manager The newly associated Manager

start

public void start()
Prepare for the beginning of active use of the public methods of this component. This method should be called after configure(), and before any of the public methods of the component are utilized.

Throws: LifecycleException if this component detects a fatal error that prevents this component from being used

stop

public void stop()
Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component.

Throws: LifecycleException if this component detects a fatal error that needs to be reported

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.