|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.cache.demo.JBossCacheView
public class JBossCacheView
Graphical view of a JBoss Cache instance. Think of it as a view in an MVC model. An instance of this view
needs to be given a reference to the model (CacheModelDelegate
) and needs to registers as a
org.jboss.cache.CacheListener
. Changes to the cache structure are propagated from the model to the
view (via the CacheListener interface), changes from the GUI (e.g. by a user) are executed on the cache model
which will delegate on the actual Cache instance (which, if clustered, will broadcast the changes to all replicas).
Constructor Summary | |
---|---|
JBossCacheView()
|
Method Summary | |
---|---|
protected CacheModelDelegate |
createCacheDelegate()
Factory method that creates the cache model delegate instance for this demo |
protected JBossCacheGUI |
createCacheGUI(CacheModelDelegate cacheDelegate,
boolean useConsole)
Factory method that creates a cache GUI instance |
void |
doMain(java.lang.String[] args)
Main code for the view |
java.lang.String |
getConfigurationFile()
Gets the configuration file |
static void |
main(java.lang.String[] args)
Starts the view |
protected void |
parseParameters(java.lang.String[] args)
Parses the parameters |
void |
setCacheModelDelegate(CacheModelDelegate cacheModelDelegate)
Sets a reference to the cache model |
void |
start()
Starts the view |
void |
stop()
Stops the view |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JBossCacheView()
Method Detail |
---|
public java.lang.String getConfigurationFile()
public void setCacheModelDelegate(CacheModelDelegate cacheModelDelegate)
cacheModelDelegate
- cache model instance to associate with this viewpublic void doMain(java.lang.String[] args) throws java.lang.Exception
args
- arguments passed via command line
java.lang.Exception
- if there's any issues starting the cache demopublic void start() throws java.lang.Exception
java.lang.Exception
public void stop()
public static void main(java.lang.String[] args)
args
- valid arguments are: -console to enable using the embedded beanShell console, -config [path/to/config/file] to specify a config file.protected void parseParameters(java.lang.String[] args)
args
- arguments passed via command lineprotected CacheModelDelegate createCacheDelegate() throws java.lang.Exception
java.lang.Exception
protected JBossCacheGUI createCacheGUI(CacheModelDelegate cacheDelegate, boolean useConsole) throws java.lang.Exception
cacheDelegate
- cache model instanceuseConsole
- whether to enable the embedded beanshell console
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |