de.laures.cewolf.storage
Class AbstractSessionStorage

java.lang.Object
  extended by de.laures.cewolf.storage.AbstractSessionStorage
All Implemented Interfaces:
Storage, java.io.Serializable
Direct Known Subclasses:
ClusterableSessionStorage, TransientSessionStorage

public abstract class AbstractSessionStorage
extends java.lang.Object
implements Storage

Author:
glaures
See Also:
Serialized Form

Field Summary
protected static int removed
           
protected static int stored
           
 
Constructor Summary
AbstractSessionStorage()
           
 
Method Summary
 boolean contains(ChartImage cid, javax.servlet.jsp.PageContext pageContext)
           
protected abstract  java.lang.Object getCacheObject(ChartImage cid)
           
 ChartImage getChartImage(java.lang.String id, javax.servlet.http.HttpServletRequest request)
          Retrieves a chart image.
 java.lang.String getKey(ChartImage cid)
           
 void init(javax.servlet.ServletContext servletContext)
          Method init.
 java.lang.String removeChartImage(java.lang.String imgKey, javax.servlet.http.HttpServletRequest request)
          Removes the image from the storage
protected  java.lang.String removeChartImage(java.lang.String cid, javax.servlet.http.HttpSession session)
           
protected  java.lang.String storeChartImage(ChartImage cid, javax.servlet.http.HttpSession session)
           
 java.lang.String storeChartImage(ChartImage cid, javax.servlet.jsp.PageContext pageContext)
          Stores a chart image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stored

protected static volatile int stored

removed

protected static volatile int removed
Constructor Detail

AbstractSessionStorage

public AbstractSessionStorage()
Method Detail

storeChartImage

public java.lang.String storeChartImage(ChartImage cid,
                                        javax.servlet.jsp.PageContext pageContext)
                                 throws CewolfException
Description copied from interface: Storage
Stores a chart image.

Specified by:
storeChartImage in interface Storage
Parameters:
cid - the image to be stored
pageContext - servletContext which might be needed
Returns:
String the storage id which is used to find the image in storage
Throws:
CewolfException
See Also:
Storage.storeChartImage(ChartImage, PageContext)

getChartImage

public ChartImage getChartImage(java.lang.String id,
                                javax.servlet.http.HttpServletRequest request)
Description copied from interface: Storage
Retrieves a chart image.

Specified by:
getChartImage in interface Storage
Parameters:
id - the id of the image
request - the request
Returns:
ChartImage the stored image instance
See Also:
Storage.getChartImage(String, javax.servlet.http.HttpServletRequest)

contains

public boolean contains(ChartImage cid,
                        javax.servlet.jsp.PageContext pageContext)

getKey

public final java.lang.String getKey(ChartImage cid)

storeChartImage

protected java.lang.String storeChartImage(ChartImage cid,
                                           javax.servlet.http.HttpSession session)
                                    throws CewolfException
Throws:
CewolfException

removeChartImage

public java.lang.String removeChartImage(java.lang.String imgKey,
                                         javax.servlet.http.HttpServletRequest request)
                                  throws CewolfException
Description copied from interface: Storage
Removes the image from the storage

Specified by:
removeChartImage in interface Storage
Parameters:
imgKey - Image id
request - Servlet request
Returns:
Image id
Throws:
CewolfException

removeChartImage

protected java.lang.String removeChartImage(java.lang.String cid,
                                            javax.servlet.http.HttpSession session)
                                     throws CewolfException
Throws:
CewolfException

getCacheObject

protected abstract java.lang.Object getCacheObject(ChartImage cid)
                                            throws CewolfException
Throws:
CewolfException

init

public void init(javax.servlet.ServletContext servletContext)
          throws CewolfException
Description copied from interface: Storage
Method init.

Specified by:
init in interface Storage
Throws:
CewolfException
See Also:
Storage.init(ServletContext)


cewolf tag library - web charts with JFreeChart