You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by tv...@apache.org on 2007/11/01 18:10:03 UTC
svn commit: r591087 - /jakarta/jcs/trunk/xdocs/ElementEventHandling.xml
Author: tv
Date: Thu Nov 1 10:10:02 2007
New Revision: 591087
URL: http://svn.apache.org/viewvc?rev=591087&view=rev
Log:
Document element extraction from event.
Modified:
jakarta/jcs/trunk/xdocs/ElementEventHandling.xml
Modified: jakarta/jcs/trunk/xdocs/ElementEventHandling.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/xdocs/ElementEventHandling.xml?rev=591087&r1=591086&r2=591087&view=diff
==============================================================================
--- jakarta/jcs/trunk/xdocs/ElementEventHandling.xml (original)
+++ jakarta/jcs/trunk/xdocs/ElementEventHandling.xml Thu Nov 1 10:10:02 2007
@@ -132,6 +132,20 @@
is done asynchronously. Events are added to an event
queue and processed by background threads.
</p>
+ <p>
+ Here is how to extract the event and source from the
+ IElementEvent:
+ </p>
+ <source>
+ <![CDATA[
+ public void handleElementEvent( IElementEvent event )
+ {
+ int eventType = event.getElementEvent();
+ CacheElement element = (CacheElement)((EventObject)event).getSource();
+ . . .
+ }
+ ]]>
+ </source>
<p>
Once you have an IElementEventHandler implementation,
you can attach it to an element via the Element
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org