public class WandoraTopicMapManager extends AbstractModule implements TopicMapManager
A TopicMapManager implementation that uses a running Wandora application for the topic map. This will only work if the Wandora application is running in the same virtual machine. Wandora is not a module in the framework, instead it is accessed using the static Wandora.getWandora method.
This module does not use any initialisation parameters beyond those of AbstractModule.
TopicMapManager.TopicMapManagerListener
Modifier and Type | Field and Description |
---|---|
protected ListenerList<TopicMapManager.TopicMapManagerListener> |
managerListeners |
protected java.util.concurrent.locks.ReadWriteLock |
tmLock |
protected Wandora |
wandora |
autoStart, isInitialized, isRunning, logging, loggingModule, moduleManager
Constructor and Description |
---|
WandoraTopicMapManager() |
Modifier and Type | Method and Description |
---|---|
void |
addTopicMapManagerListener(TopicMapManager.TopicMapManagerListener listener)
Adds a topic map listener that will be notified when the managed
topic map is replaced with another topic map.
|
protected void |
fireTopicMapChanged(TopicMap old,
TopicMap neu) |
java.util.Collection<Module> |
getDependencies(ModuleManager manager)
Returns all the modules this module depends on.
|
TopicMap |
getTopicMap()
Returns the topic map managed by this topic map manager.
|
boolean |
lockRead()
Locks the topic map for reading.
|
boolean |
lockWrite()
Locks the topic map for writing.
|
void |
removeTopicMapManagerListener(TopicMapManager.TopicMapManagerListener listener)
Removes a topic map listener.
|
void |
start(ModuleManager manager)
Starts the module.
|
void |
stop(ModuleManager manager)
Stops the module.
|
void |
unlockRead()
Releases a previously acquired read lock.
|
void |
unlockWrite()
Releases a previously acquired write lock.
|
init, isInitialized, isRunning, requireLogging, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
init, isInitialized, isRunning
protected final ListenerList<TopicMapManager.TopicMapManagerListener> managerListeners
protected java.util.concurrent.locks.ReadWriteLock tmLock
protected Wandora wandora
public java.util.Collection<Module> getDependencies(ModuleManager manager) throws ModuleException
Module
getDependencies
in interface Module
getDependencies
in class AbstractModule
manager
- The module manager handling this module.ModuleException
public void start(ModuleManager manager) throws ModuleException
Module
start
in interface Module
start
in class AbstractModule
manager
- The module manager handling this module.ModuleException
public void stop(ModuleManager manager)
Module
stop
in interface Module
stop
in class AbstractModule
manager
- The module manager handling this module.public boolean lockRead()
TopicMapManager
lockRead
in interface TopicMapManager
public void unlockRead()
TopicMapManager
unlockRead
in interface TopicMapManager
public boolean lockWrite()
TopicMapManager
lockWrite
in interface TopicMapManager
public void unlockWrite()
TopicMapManager
unlockWrite
in interface TopicMapManager
public TopicMap getTopicMap()
TopicMapManager
getTopicMap
in interface TopicMapManager
public void addTopicMapManagerListener(TopicMapManager.TopicMapManagerListener listener)
TopicMapManager
addTopicMapManagerListener
in interface TopicMapManager
listener
- The topic map listener.public void removeTopicMapManagerListener(TopicMapManager.TopicMapManagerListener listener)
TopicMapManager
removeTopicMapManagerListener
in interface TopicMapManager
listener
- The listener.Copyright 2004-2015 Wandora Team