com.jfw.examples
Class MyCache

java.lang.Object
  extended by com.jfw.util.GenericCache
      extended by com.jfw.examples.MyCache
All Implemented Interfaces:
java.util.Observer

public final class MyCache
extends GenericCache


Field Summary
 
Fields inherited from class com.jfw.util.GenericCache
isObserver, updateObservable
 
Method Summary
 java.lang.Object getData(java.lang.Object object)
          Return cached data.
static MyCache getInstance()
           
protected  void initialize()
          Read from a source the data to cache.
 
Methods inherited from class com.jfw.util.GenericCache
update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MyCache getInstance()

initialize

protected void initialize()
                   throws java.lang.Exception
Description copied from class: GenericCache
Read from a source the data to cache.
The method is called in the constructor and in GenericCache.update().

Specified by:
initialize in class GenericCache
Throws:
java.lang.Exception

getData

public java.lang.Object getData(java.lang.Object object)
                         throws java.lang.Exception
Description copied from class: GenericCache
Return cached data.

Specified by:
getData in class GenericCache
Parameters:
object - input object to use or null.
Returns:
cache data.
Throws:
java.lang.Exception