Interface ZooInspectorManager
-
- All Superinterfaces:
ZooInspectorNodeManager
,ZooInspectorNodeTreeManager
,ZooInspectorReadOnlyManager
- All Known Implementing Classes:
ZooInspectorManagerImpl
public interface ZooInspectorManager extends ZooInspectorNodeManager, ZooInspectorNodeTreeManager
A Manager for all interactions between the application and the Zookeeper instance
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addWatchers(java.util.Collection<java.lang.String> selectedNodes, NodeListener nodeListener)
boolean
connect(java.util.Properties connectionProps)
boolean
disconnect()
Pair<java.util.Map<java.lang.String,java.util.List<java.lang.String>>,java.util.Map<java.lang.String,java.lang.String>>
getConnectionPropertiesTemplate()
java.util.List<java.lang.String>
getDefaultNodeViewerConfiguration()
java.util.Properties
getLastConnectionProps()
java.util.List<java.lang.String>
loadNodeViewersFile(java.io.File selectedFile)
void
removeWatchers(java.util.Collection<java.lang.String> selectedNodes)
void
saveDefaultConnectionFile(java.util.Properties props)
void
saveNodeViewersFile(java.io.File selectedFile, java.util.List<java.lang.String> nodeViewersClassNames)
void
setDefaultNodeViewerConfiguration(java.util.List<java.lang.String> nodeViewersClassNames)
void
setLastConnectionProps(java.util.Properties connectionProps)
-
Methods inherited from interface org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager
setData
-
Methods inherited from interface org.apache.zookeeper.inspector.manager.ZooInspectorNodeTreeManager
createNode, deleteNode
-
Methods inherited from interface org.apache.zookeeper.inspector.manager.ZooInspectorReadOnlyManager
getACLs, getChildren, getData, getNodeMeta, getNumChildren
-
-
-
-
Method Detail
-
connect
boolean connect(java.util.Properties connectionProps)
- Parameters:
connectionProps
-- Returns:
- true if successfully connected
-
disconnect
boolean disconnect()
- Returns:
- true if successfully disconnected
-
getConnectionPropertiesTemplate
Pair<java.util.Map<java.lang.String,java.util.List<java.lang.String>>,java.util.Map<java.lang.String,java.lang.String>> getConnectionPropertiesTemplate()
- Returns:
- a
Pair
containing the following:- a
Map
of property keys to list of possible values. If the list size is 1 the value is taken to be the default value for aJTextField
. If the list size is greater than 1, the values are taken to be the possible options to show in aJComboBox
with the first selected as default. - a
Map
of property keys to the label to show on the UI
- a
-
addWatchers
void addWatchers(java.util.Collection<java.lang.String> selectedNodes, NodeListener nodeListener)
- Parameters:
selectedNodes
- - the nodes to add the watcher tonodeListener
- - the node listener for this watcher
-
removeWatchers
void removeWatchers(java.util.Collection<java.lang.String> selectedNodes)
- Parameters:
selectedNodes
- - the nodes to remove the watchers from
-
loadNodeViewersFile
java.util.List<java.lang.String> loadNodeViewersFile(java.io.File selectedFile) throws java.io.IOException
- Parameters:
selectedFile
- - the file to load which contains the node viewers configuration- Returns:
- nodeViewers - the class names of the node viewers from the configuration
- Throws:
java.io.IOException
- - if the configuration file cannot be loaded
-
saveNodeViewersFile
void saveNodeViewersFile(java.io.File selectedFile, java.util.List<java.lang.String> nodeViewersClassNames) throws java.io.IOException
- Parameters:
selectedFile
- - the file to save the configuration tonodeViewersClassNames
- - the class names of the node viewers- Throws:
java.io.IOException
- - if the configuration file cannot be saved
-
setDefaultNodeViewerConfiguration
void setDefaultNodeViewerConfiguration(java.util.List<java.lang.String> nodeViewersClassNames) throws java.io.IOException
- Parameters:
nodeViewersClassNames
- - the class names of the node viewers- Throws:
java.io.IOException
- - if the default configuration file cannot be loaded
-
getDefaultNodeViewerConfiguration
java.util.List<java.lang.String> getDefaultNodeViewerConfiguration() throws java.io.IOException
- Returns:
- nodeViewers - the class names of the node viewers from the configuration
- Throws:
java.io.IOException
- - if the default configuration file cannot be loaded
-
setLastConnectionProps
void setLastConnectionProps(java.util.Properties connectionProps)
- Parameters:
connectionProps
- - the connection properties last used to connect to the zookeeeper instance
-
getLastConnectionProps
java.util.Properties getLastConnectionProps()
- Returns:
- last connection Properties - the connection properties last used to connect to the zookeeeper instance
-
saveDefaultConnectionFile
void saveDefaultConnectionFile(java.util.Properties props) throws java.io.IOException
- Parameters:
props
- - the properties to use as the default connection settings- Throws:
java.io.IOException
- - if the default configuration file cannot be saved
-
-