Interface ZooInspectorManager

    • 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 a JTextField. If the list size is greater than 1, the values are taken to be the possible options to show in a JComboBox with the first selected as default.
        • a Map of property keys to the label to show on the UI
      • addWatchers

        void addWatchers​(java.util.Collection<java.lang.String> selectedNodes,
                         NodeListener nodeListener)
        Parameters:
        selectedNodes - - the nodes to add the watcher to
        nodeListener - - 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 to
        nodeViewersClassNames - - 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