org.jboss.cache
Class TreeCacheView

java.lang.Object
  extended by org.jboss.cache.TreeCacheView
All Implemented Interfaces:
TreeCacheViewMBean

public class TreeCacheView
extends java.lang.Object
implements TreeCacheViewMBean

Graphical view of a ReplicatedTree (using the MVC paradigm). An instance of this class needs to be given a reference to the underlying model (ReplicatedTree) and needs to registers as a ReplicatedTreeListener. Changes to the cache structure are propagated from the model to the view (via ReplicatedTreeListener), changes from the GUI (e.g. by a user) are executed on the cache model (which will broadcast the changes to all replicas).

The view itself caches only the nodes, but doesn't cache any of the data (HashMap) associated with it. When data needs to be displayed, the underlying cache will be accessed directly.

Version:
$Revision: 1.29 $
Author:
Bela Ban

Constructor Summary
TreeCacheView()
           
TreeCacheView(Cache cache)
           
TreeCacheView(CacheJmxWrapper mbean)
           
 
Method Summary
 void create()
           
 void destroy()
           
 Cache getCache()
           
 CacheJmxWrapperMBean getCacheService()
           
static void main(java.lang.String[] args)
           
 void setCache(Cache cache)
           
 void setCacheService(CacheJmxWrapperMBean cache_service)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeCacheView

public TreeCacheView()
              throws java.lang.Exception
Throws:
java.lang.Exception

TreeCacheView

public TreeCacheView(Cache cache)
              throws java.lang.Exception
Throws:
java.lang.Exception

TreeCacheView

public TreeCacheView(CacheJmxWrapper mbean)
              throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

create

public void create()
Specified by:
create in interface TreeCacheViewMBean

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface TreeCacheViewMBean
Throws:
java.lang.Exception

stop

public void stop()
Specified by:
stop in interface TreeCacheViewMBean

destroy

public void destroy()
Specified by:
destroy in interface TreeCacheViewMBean

getCache

public Cache getCache()
Specified by:
getCache in interface TreeCacheViewMBean

setCache

public void setCache(Cache cache)
Specified by:
setCache in interface TreeCacheViewMBean

getCacheService

public CacheJmxWrapperMBean getCacheService()
Specified by:
getCacheService in interface TreeCacheViewMBean

setCacheService

public void setCacheService(CacheJmxWrapperMBean cache_service)
Specified by:
setCacheService in interface TreeCacheViewMBean
Parameters:
cache_service -
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)