Class ConfigReader

  • Direct Known Subclasses:
    ConfigFromConnection, ConfigFromFile

    public abstract class ConfigReader
    extends Object
    An abstract class providing some common interface for the class that read the configuration (and if the server is running, the monitoring information).
    • Field Detail

      • configFile

        public static String configFile
        The configuration file full path (-INSTANCE_ROOT-/config/config.ldif). of the installation of the control panel.
      • environmentSettingException

        protected static OpenDsException environmentSettingException
        The error that occurred when setting the environment (null if no error occurred).
      • exceptions

        protected List<Exception> exceptions
        The exceptions that occurred reading the configuration.
      • administrativeUsers

        protected Set<DN> administrativeUsers
        The set of administrative users.
      • replicationPort

        protected int replicationPort
        The replication serve port (-1 if the replication server port is not defined).
      • javaVersion

        protected String javaVersion
        The java version used to run the server.
      • numberConnections

        protected int numberConnections
        The number of connections opened on the server.
      • isSchemaEnabled

        protected boolean isSchemaEnabled
        Whether the schema checking is enabled or not.
      • schema

        protected Schema schema
        The schema used by the server.
      • taskEntries

        protected Set<TaskEntry> taskEntries
        The task entries.
    • Constructor Detail

      • ConfigReader

        public ConfigReader()
    • Method Detail

      • getAdministrativeUsers

        public Set<DN> getAdministrativeUsers()
        Returns the Administrative User DNs found in the config.ldif. The set must be unmodifiable (the inheriting classes must take care of this).
        Returns:
        the Administrative User DNs found in the config.ldif.
      • getBackends

        public Set<BackendDescriptor> getBackends()
        Returns the backend descriptors found in the config.ldif. The set must be unmodifiable (the inheriting classes must take care of this).
        Returns:
        the backend descriptors found in the config.ldif.
      • getConnectionHandlers

        public Set<ConnectionHandlerDescriptor> getConnectionHandlers()
        Returns the listener descriptors found in the config.ldif. The set must be unmodifiable (the inheriting classes must take care of this).
        Returns:
        the listeners descriptors found in the config.ldif.
      • getAdminConnector

        public ConnectionHandlerDescriptor getAdminConnector()
        Returns the admin connector.
        Returns:
        the admin connector.
      • getExceptions

        public List<Exception> getExceptions()
        Returns the list of exceptions that were encountered reading the configuration. The list must be unmodifiable (the inheriting classes must take care of this).
        Returns:
        the list of exceptions that were encountered reading the configuration.
      • isConfigRead

        public boolean isConfigRead()
        Returns true if the configuration has been read at least once and false otherwise.
        Returns:
        true if the configuration has been read at least once and false otherwise.
      • getReplicationPort

        public int getReplicationPort()
        Returns the replication server port. -1 if no replication server port is defined.
        Returns:
        the replication server port. -1 if no replication server port is defined.
      • isSchemaEnabled

        public boolean isSchemaEnabled()
        Returns true if the schema check is enabled and false otherwise.
        Returns:
        true if the schema check is enabled and false otherwise.
      • getJavaVersion

        public String getJavaVersion()
        Returns the java version used to run the server. null if no java version is used (because the server is down).
        Returns:
        the java version used to run the server. null if no java version is used (because the server is down).
      • getOpenConnections

        public int getOpenConnections()
        Returns the number of open connections on the server. -1 if the server is down.
        Returns:
        the number of open connections on the server.
      • getSchema

        public Schema getSchema()
        Returns the schema of the server.
        Returns:
        the schema of the server.
      • getTaskEntries

        public Set<TaskEntry> getTaskEntries()
        Returns the task entries.
        Returns:
        the task entries.
      • getVLVSortOrder

        protected List<VLVSortOrder> getVLVSortOrder​(String s)
        Method that transforms the VLV sort order value as it is defined in the schema to a list of VLVSortOrder objects.
        Parameters:
        s - the string in the configuration.
        Returns:
        a list of VLVSortOrder objects.
      • getInetAddressComparator

        protected Comparator<InetAddress> getInetAddressComparator()
        Returns the comparator to be used to sort InetAddresses.
        Returns:
        the comparator to be used to sort InetAddresses.
      • mustReadSchema

        protected boolean mustReadSchema()
        Returns true if the schema must be read and false otherwise.
        Returns:
        true if the schema must be read and false otherwise.