Package org.jfree.chart.servlet
Class ChartDeleter
- java.lang.Object
-
- org.jfree.chart.servlet.ChartDeleter
-
- All Implemented Interfaces:
Serializable
,EventListener
,javax.servlet.http.HttpSessionBindingListener
public class ChartDeleter extends Object implements javax.servlet.http.HttpSessionBindingListener, Serializable
Used for deleting charts from the temporary directory when the users session expires.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ChartDeleter()
Blank constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChart(String filename)
Add a chart to be deleted when the session expiresboolean
isChartAvailable(String filename)
Checks to see if a chart is in the list of charts to be deletedvoid
valueBound(javax.servlet.http.HttpSessionBindingEvent event)
Binding this object to the session has no additional effects.void
valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
When this object is unbound from the session (including upon session expiry) the files that have been added to the ArrayList are iterated and deleted.
-
-
-
Method Detail
-
addChart
public void addChart(String filename)
Add a chart to be deleted when the session expires- Parameters:
filename
- the name of the chart in the temporary directory to be deleted.
-
isChartAvailable
public boolean isChartAvailable(String filename)
Checks to see if a chart is in the list of charts to be deleted- Parameters:
filename
- the name of the chart in the temporary directory.- Returns:
- A boolean value indicating whether the chart is present in the list.
-
valueBound
public void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
Binding this object to the session has no additional effects.- Specified by:
valueBound
in interfacejavax.servlet.http.HttpSessionBindingListener
- Parameters:
event
- the session bind event.
-
valueUnbound
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
When this object is unbound from the session (including upon session expiry) the files that have been added to the ArrayList are iterated and deleted.- Specified by:
valueUnbound
in interfacejavax.servlet.http.HttpSessionBindingListener
- Parameters:
event
- the session unbind event.
-
-