freemarker.template
Class CacheEvent
java.lang.Object
|
+--java.util.EventObject
|
+--freemarker.template.CacheEvent
- All Implemented Interfaces:
- java.io.Serializable
- public final class CacheEvent
- extends java.util.EventObject
An event fired by self-updating caches.
- Version:
- $Id: CacheEvent.java,v 1.10 2003/11/13 09:34:34 run2000 Exp $
- See Also:
CacheListener
,
FileTemplateCache
, Serialized Form
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
CacheEvent(java.lang.Object source)
Constructor that takes the object where the event originated. |
CacheEvent(java.lang.Object source,
java.lang.String elementName,
java.lang.Exception exception)
Constructor that takes an element name, and the exception that caused
the event. |
CacheEvent(java.lang.Object source,
java.lang.String elementName,
long lastModified)
Constructor that takes an element name, and the exception that caused
the event. |
Method Summary |
java.lang.String |
getElementName()
Retrieves the name of the element that caused the event. |
java.lang.Exception |
getException()
Retrieves the exception that caused the event. |
long |
getLastModified()
Retrieves the last modification date of the named element. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CacheEvent
public CacheEvent(java.lang.Object source)
- Constructor that takes the object where the event originated.
- Parameters:
source
- the source of this event
CacheEvent
public CacheEvent(java.lang.Object source,
java.lang.String elementName,
long lastModified)
- Constructor that takes an element name, and the exception that caused
the event.
- Parameters:
source
- the source of this eventelementName
- the name of the cache elementlastModified
- the time that the element was last modified
CacheEvent
public CacheEvent(java.lang.Object source,
java.lang.String elementName,
java.lang.Exception exception)
- Constructor that takes an element name, and the exception that caused
the event.
- Parameters:
source
- the source of this eventelementName
- the name of the cache elementexception
- the exception that caused the event
getException
public java.lang.Exception getException()
- Retrieves the exception that caused the event.
- Returns:
- the
Exception
, if any, associated with this
event.
getElementName
public java.lang.String getElementName()
- Retrieves the name of the element that caused the event.
- Returns:
- the name of the cache element, if any, associated with this
event.
getLastModified
public long getLastModified()
- Retrieves the last modification date of the named element. Applicable
only for elementUpdated events.
- Returns:
- a
long
representing the time in milliseconds that
the element was last modified, or 0
if no time is specified