com.opensymphony.oscache.base.events
Class CacheEvent

java.lang.Object
  extended by com.opensymphony.oscache.base.events.CacheEvent
Direct Known Subclasses:
CacheEntryEvent, CacheGroupEvent, CacheMapAccessEvent, CachePatternEvent, CachewideEvent, ScopeEvent

public abstract class CacheEvent
extends Object

The root event class for all cache events. Each subclasses of this class classifies a particular type of cache event.

Author:
Chris Miller Date: 20-May-2003 Time: 15:25:02

Field Summary
protected  String origin
          An optional tag that can be attached to the event to specify the event's origin.
 
Constructor Summary
CacheEvent()
          No-argument constructor so subtypes can easily implement Serializable
CacheEvent(String origin)
          Creates a cache event object that came from the specified origin.
 
Method Summary
 String getOrigin()
          Retrieves the origin of this event, if one was specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

origin

protected String origin
An optional tag that can be attached to the event to specify the event's origin.

Constructor Detail

CacheEvent

public CacheEvent()
No-argument constructor so subtypes can easily implement Serializable


CacheEvent

public CacheEvent(String origin)
Creates a cache event object that came from the specified origin.

Parameters:
origin - A string that indicates where this event was fired from. This value is optional; null can be passed in if an origin is not required.
Method Detail

getOrigin

public String getOrigin()
Retrieves the origin of this event, if one was specified. This is most useful when an event handler causes another event to fire - by checking the origin the handler is able to prevent recursive events being fired.


OSCache Project Page