org.apache.catalina.session

## Class StoreBase

- java.lang.Object
- - org.apache.catalina.util.LifecycleBase
  - - org.apache.catalina.session.StoreBase

All Implemented Interfaces:
  Lifecycle, Store

Direct Known Subclasses:
  FileStore, JDBCStore

    public abstract class StoreBase
    extends LifecycleBase
    implements Store

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

Author:
  Bip Thelin

### Field Summary

Fields
`protected static String` `info` The descriptive information about this implementation.
`protected Manager` `manager` The Manager with which this JDBCStore is associated.
`protected static StringManager` `sm` The string manager for this package.
`protected static String` `storeName` Name to register for this Store, used for logging.
`protected PropertyChangeSupport` `support` The property change support for this component.

### Fields inherited from interface org.apache.catalina.Lifecycle

`AFTER_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 Summary

Constructors
Constructor and Description
`StoreBase()`

### Method Summary

Methods
`void` `addPropertyChangeListener(PropertyChangeListener listener)` Add a property change listener to this component.
`protected void` `destroyInternal()`
`String` `getInfo()` Return the info for this Store.
`Manager` `getManager()` Return the Manager with which the Store is associated.
`String` `getStoreName()` Return the name for this Store, used for logging.
`protected void` `initInternal()`
`void` `processExpires()` Called by our background reaper thread to check if Sessions saved in our store are subject of being expired.
`void` `removePropertyChangeListener(PropertyChangeListener listener)` Remove a property change listener from this component.
`void` `setManager(Manager manager)` Set the Manager with which this Store is associated.
`protected void` `startInternal()` Start this component and implement the requirements of `LifecycleBase.startInternal()`.
`protected void` `stopInternal()` Stop this component and implement the requirements of `LifecycleBase.stopInternal()`.
`String` `toString()` Return a String rendering of this object.

### Methods inherited from class org.apache.catalina.util.LifecycleBase

`addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.catalina.Store

`clear, getSize, keys, load, remove, save`

### Field Detail

#### info

    protected static final String info

The descriptive information about this implementation.

See Also:
  Constant Field Values

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

#### sm

    protected static final StringManager sm

The string manager for this package.

#### manager

    protected Manager manager

The Manager with which this JDBCStore is associated.

### Constructor Detail

#### StoreBase

    public StoreBase()

### Method Detail

#### getInfo

    public String getInfo()

Return the info for this Store.

Specified by:
  `getInfo` in interface `Store`

#### getStoreName

    public String getStoreName()

Return the name for this Store, used for logging.

#### setManager

    public void setManager(Manager manager)

Set the Manager with which this Store is associated.

Specified by:
  `setManager` in interface `Store`
Parameters:
  `manager` - The newly associated Manager

#### getManager

    public Manager getManager()

Return the Manager with which the Store is associated.

Specified by:
  `getManager` in interface `Store`

#### addPropertyChangeListener

    public void addPropertyChangeListener(PropertyChangeListener listener)

Add a property change listener to this component.

Specified by:
  `addPropertyChangeListener` in interface `Store`
Parameters:
  `listener` - a value of type 'PropertyChangeListener'

#### removePropertyChangeListener

    public void removePropertyChangeListener(PropertyChangeListener listener)

Remove a property change listener from this component.

Specified by:
  `removePropertyChangeListener` in interface `Store`
Parameters:
  `listener` - The listener to remove

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

#### initInternal

    protected void initInternal()

Specified by:
  `initInternal` in class `LifecycleBase`

#### startInternal

    protected void startInternal()
                          throws LifecycleException

Start this component and implement the requirements of `LifecycleBase.startInternal()`.

Specified by:
  `startInternal` in class `LifecycleBase`
Throws:
  `LifecycleException` - if this component detects a fatal error that prevents this component from being used

#### stopInternal

    protected void stopInternal()
                         throws LifecycleException

Stop this component and implement the requirements of `LifecycleBase.stopInternal()`.

Specified by:
  `stopInternal` in class `LifecycleBase`
Throws:
  `LifecycleException` - if this component detects a fatal error that prevents this component from being used

#### destroyInternal

    protected void destroyInternal()

Specified by:
  `destroyInternal` in class `LifecycleBase`

#### toString

    public String toString()

Return a String rendering of this object.

Overrides:
  `toString` in class `Object`