Lifecycle.SingleUse
Modifier and Type | Field and Description |
---|---|
protected Manager |
manager
The Manager with which this Store 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.
|
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 and Description |
---|
StoreBase() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.
|
protected void |
destroyInternal() |
String[] |
expiredKeys()
Get only those keys of sessions, that are saved in the Store and are to
be expired.
|
Manager |
getManager() |
protected ObjectInputStream |
getObjectInputStream(InputStream is)
Create the object input stream to use to read a session from the store.
|
String |
getStoreName() |
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() |
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop
protected static final String storeName
protected final PropertyChangeSupport support
protected static final StringManager sm
protected Manager manager
public String getStoreName()
public void setManager(Manager manager)
setManager
in interface Store
manager
- The newly associated Managerpublic Manager getManager()
getManager
in interface Store
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface Store
listener
- a value of type PropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface Store
listener
- The listener to removepublic String[] expiredKeys() throws IOException
IOException
- if an input-/output error occurredpublic void processExpires()
protected ObjectInputStream getObjectInputStream(InputStream is) throws IOException
is
- The input stream provided by the sub-class that will provide
the data for a sessionIOException
- if a problem occurs creating the ObjectInputStreamprotected void initInternal()
initInternal
in class LifecycleBase
protected void startInternal() throws LifecycleException
LifecycleBase.startInternal()
.startInternal
in class LifecycleBase
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedprotected void stopInternal() throws LifecycleException
LifecycleBase.stopInternal()
.stopInternal
in class LifecycleBase
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedprotected void destroyInternal()
destroyInternal
in class LifecycleBase
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.