|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.data.impl.DefaultDataCore
The core of a DataManagerComponent.
It registers the plug ins, administers the data structure and handles
requests for data. This class should never be exposed to users or
administrators of the
DataManagerComponent.
When performing operations that need exclusive access to the DataCore
you must synchronize on the Object returned by
getSynchronizeObject().
| Constructor Summary | |
DefaultDataCore()
Constructor. |
|
| Method Summary | |
NodeController |
addNode(Node node)
Registers a node. |
void |
collectSystemInfo(SystemInfoNode root,
SystemInfoOptions options)
Builds the system information tree upon local information of the implementor. |
void |
dispose()
Disposes the component. |
NodeController |
getNodeController(java.lang.String key)
Returns the internal node with the given key |
java.util.Set |
getNodeKeys()
|
DataManagerPlugIn |
getPlugIn(java.lang.Class plugInInterface)
Returns the desired plug in implementation |
java.lang.Object |
getSynchronizeObject()
When performing an operation on the DataCore
that should must be exclusive you should synchronize
on this Object. |
boolean |
hasNode(java.lang.String key)
Tests whether a given node exists |
boolean |
hasPlugIn(java.lang.Class plugInInterface)
Tests whether the plug in is registered with the data core |
void |
registerDataManagerPluginCallback(DataManagerPluginCallback callback)
|
void |
registerPlugIn(java.lang.Class plugInInterface,
AbstractDataManagerPlugIn plugIn)
Registers a plug in with the DataManager. |
NodeController |
removeNode(java.lang.String key)
Removes a node and all nodes that depend on it. |
void |
unregisterDataManagerPluginCallback(DataManagerPluginCallback callback)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultDataCore()
| Method Detail |
public java.lang.Object getSynchronizeObject()
DataCoreDataCore
that should must be exclusive you should synchronize
on this Object.
getSynchronizeObject in interface DataCoreObject to synchronize on when performing exclusive operations within
the DataManager.DataCore.getSynchronizeObject()public boolean hasNode(java.lang.String key)
DataCore
hasNode in interface DataCorekey - the key of the node
DataCore.hasNode(java.lang.String)public NodeController getNodeController(java.lang.String key)
DataCore
getNodeController in interface DataCorekey - the key of the node
DataCore.getNodeController(java.lang.String)public NodeController removeNode(java.lang.String key)
key - the key of the node to remove
java.lang.IllegalArgumentException - if the given key is unknownpublic NodeController addNode(Node node)
node - the structure definition
java.lang.IllegalArgumentException - if a node with the key is already knownpublic java.util.Set getNodeKeys()
public void registerPlugIn(java.lang.Class plugInInterface,
AbstractDataManagerPlugIn plugIn)
DataManager. Plug ins are notified
about changes in the data structure in the order they are registered here.
Note that this method may not be called after the first node definition.
Plug ins do not support inheritance in their interfaces, i.e.
the call to DataManager.getPlugIn(Class) will only return
the plug in implementation with the same interface that the plugin has
been registered here.
You may register a single plug in instance under multiple interfaces,
but then the instance must be capable of dealing with multiple calls
to DataManagerPlugIn.install(DataCore). Note that the
AbstractDataManagerPlugIn is not capable to be registered
multiple times.
plugInInterface - the interface defining the plugIns of the plug in,
must extend DataManagerPlugIn.plugIn - the implementation of the plug in, must implement the given
interface
java.lang.IllegalStateException - if there has already been a node configuredpublic boolean hasPlugIn(java.lang.Class plugInInterface)
DataCore
hasPlugIn in interface DataCoreplugInInterface - the plug in interface
DataCore.hasPlugIn(java.lang.Class)public DataManagerPlugIn getPlugIn(java.lang.Class plugInInterface)
DataCore
getPlugIn in interface DataCoreplugInInterface - the plug in interface
DataCore.getPlugIn(java.lang.Class)
public void dispose()
throws DisposeException
Disposable
Important:
This method is called by an administrating component
and must never be called directly.
The implementation should release any resources or objects allocated and
any services registered. Furthermore, this method should be developed
carefully to free a maximum of resources even when the system may
have become unstable. In case of one or multiple errors, you should collect
them in a DisposeException, continue with the execution,
and throw it at the end of the method.
Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.
dispose in interface DisposableDisposeException - if there was one or more errors while
disposing the component.public void registerDataManagerPluginCallback(DataManagerPluginCallback callback)
registerDataManagerPluginCallback in interface DataCoreDataCore.registerDataManagerPluginCallback(com.sdm.quasar.client.core.data.plugin.DataManagerPluginCallback)public void unregisterDataManagerPluginCallback(DataManagerPluginCallback callback)
unregisterDataManagerPluginCallback in interface DataCoreDataCore.unregisterDataManagerPluginCallback(com.sdm.quasar.client.core.data.plugin.DataManagerPluginCallback)
public void collectSystemInfo(SystemInfoNode root,
SystemInfoOptions options)
SystemInfoProviderSystemInfoOptions).
The information can be appended to the tree by adding new child
SystemInformationNodes to the root node given using the
SystemInfoNode.createChild(String) method and by setting information
attributes the these nodes or the given root node.
collectSystemInfo in interface SystemInfoProviderroot - the SystemInfoNode to add information to (guaranteed to be not null)options - contains additional options, that might influence the amount of
information added to the tree (guaranteed to be not null)SystemInfoProvider.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||