org.jboss.cache
Class TreeCacheView

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.cache.TreeCacheView
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class TreeCacheView
extends ServiceMBeanSupport (src)

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 tree structure are propagated from the model to the view (via ReplicatedTreeListener), changes from the GUI (e.g. by a user) are executed on the tree 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 tree will be accessed directly.


Nested Class Summary
static class TreeCacheView.MyListener (src)
           
 
Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
TreeCacheView()
           
TreeCacheView(java.lang.String cache_service)
           
 
Method Summary
 void create()
          create the service, do expensive operations etc
 void destroy()
          destroy the service, tear down
 java.lang.String getCacheService()
           
static void main(java.lang.String[] args)
           
 void setCacheService(java.lang.String cache_service)
           
 void start()
          start the service, create is already called
 void stop()
          stop the service
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
createService, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, startService, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
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

TreeCacheView

public TreeCacheView(java.lang.String cache_service)
              throws java.lang.Exception
Method Detail

create

public void create()
            throws java.lang.Exception
Description copied from interface: Service (src)
create the service, do expensive operations etc

Specified by:
create in interface Service (src)
Overrides:
create in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Description copied from interface: Service (src)
start the service, create is already called

Specified by:
start in interface Service (src)
Overrides:
start in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stop

public void stop()
Description copied from interface: Service (src)
stop the service

Specified by:
stop in interface Service (src)
Overrides:
stop in class ServiceMBeanSupport (src)

destroy

public void destroy()
Description copied from interface: Service (src)
destroy the service, tear down

Specified by:
destroy in interface Service (src)
Overrides:
destroy in class ServiceMBeanSupport (src)

getCacheService

public java.lang.String getCacheService()
Returns:

setCacheService

public void setCacheService(java.lang.String cache_service)
                     throws java.lang.Exception
Parameters:
cache_service -
Throws:
java.lang.Exception

main

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