org.jboss.cache
Class TreeCacheView

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.cache.TreeCacheView
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, TreeCacheViewMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class TreeCacheView
extends org.jboss.system.ServiceMBeanSupport
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 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.

Version:
$Revision: 1.10 $

Nested Class Summary
static class TreeCacheView.MyListener
           
 
Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
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()
           
 void destroy()
           
 java.lang.String getCacheService()
           
static void main(java.lang.String[] args)
           
 void setCacheService(java.lang.String cache_service)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
createService, destroyService, getDeploymentInfo, 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
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 

Constructor Detail

TreeCacheView

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

TreeCacheView

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

create

public void create()
            throws java.lang.Exception
Specified by:
create in interface TreeCacheViewMBean
Specified by:
create in interface org.jboss.system.Service
Overrides:
create in class org.jboss.system.ServiceMBeanSupport
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface TreeCacheViewMBean
Specified by:
start in interface org.jboss.system.Service
Overrides:
start in class org.jboss.system.ServiceMBeanSupport
Throws:
java.lang.Exception

stop

public void stop()
Specified by:
stop in interface TreeCacheViewMBean
Specified by:
stop in interface org.jboss.system.Service
Overrides:
stop in class org.jboss.system.ServiceMBeanSupport

destroy

public void destroy()
Specified by:
destroy in interface TreeCacheViewMBean
Specified by:
destroy in interface org.jboss.system.Service
Overrides:
destroy in class org.jboss.system.ServiceMBeanSupport

getCacheService

public java.lang.String getCacheService()
Specified by:
getCacheService in interface TreeCacheViewMBean
Returns:

setCacheService

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

main

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


Copyright 1998-2005 JBoss Inc . All Rights Reserved.