public abstract class ConfigReader extends Object
Modifier and Type | Field and Description |
---|---|
protected ConnectionHandlerDescriptor |
adminConnector
The administration connector.
|
protected Set<Dn> |
administrativeUsers
The set of administrative users.
|
protected Set<BackendDescriptor> |
backends
The set of backend descriptors.
|
protected static OpenDsException |
environmentSettingException
The error that occurred when setting the environment (null if no error occurred).
|
protected List<Exception> |
exceptions
The exceptions that occurred reading the configuration.
|
protected boolean |
isSchemaEnabled
Whether the schema checking is enabled or not.
|
protected String |
javaVersion
The java version used to run the server.
|
protected Set<ConnectionHandlerDescriptor> |
listeners
The set of connection listeners.
|
protected int |
numberConnections
The number of connections opened on the server.
|
protected int |
replicationPort
The replication serve port (-1 if the replication server port is not defined).
|
protected Schema |
schema
The schema used by the server.
|
protected Set<TaskEntry> |
taskEntries
The task entries.
|
Constructor and Description |
---|
ConfigReader() |
Modifier and Type | Method and Description |
---|---|
ConnectionHandlerDescriptor |
getAdminConnector()
Returns the admin connector.
|
Set<Dn> |
getAdministrativeUsers()
Returns the Administrative User DNs found in the config.ldif.
|
Set<BackendDescriptor> |
getBackends()
Returns the backend descriptors found in the config.ldif.
|
Set<ConnectionHandlerDescriptor> |
getConnectionHandlers()
Returns the listener descriptors found in the config.ldif.
|
List<Exception> |
getExceptions()
Returns the list of exceptions that were encountered reading the configuration.
|
protected Comparator<InetAddress> |
getInetAddressComparator()
Returns the comparator to be used to sort InetAddresses.
|
String |
getJavaVersion()
Returns the java version used to run the server.
|
int |
getOpenConnections()
Returns the number of open connections on the server.
|
int |
getReplicationPort()
Returns the replication server port.
|
Schema |
getSchema()
Returns the schema of the server.
|
Set<TaskEntry> |
getTaskEntries()
Returns the task entries.
|
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.
|
boolean |
isConfigRead()
Returns
true if the configuration has been read at least once and false otherwise. |
boolean |
isSchemaEnabled()
Returns
true if the schema check is enabled and false otherwise. |
protected boolean |
mustReadSchema()
Returns
true if the schema must be read and false otherwise. |
protected Schema |
readSchema()
Reads the schema from the files.
|
protected static OpenDsException environmentSettingException
protected List<Exception> exceptions
protected Set<ConnectionHandlerDescriptor> listeners
protected ConnectionHandlerDescriptor adminConnector
protected Set<BackendDescriptor> backends
protected int replicationPort
protected String javaVersion
protected int numberConnections
protected boolean isSchemaEnabled
protected Schema schema
public Set<Dn> getAdministrativeUsers()
public Set<BackendDescriptor> getBackends()
public Set<ConnectionHandlerDescriptor> getConnectionHandlers()
public ConnectionHandlerDescriptor getAdminConnector()
public List<Exception> getExceptions()
public boolean isConfigRead()
true
if the configuration has been read at least once and false
otherwise.true
if the configuration has been read at least once and false
otherwise.public int getReplicationPort()
public boolean isSchemaEnabled()
true
if the schema check is enabled and false
otherwise.true
if the schema check is enabled and false
otherwise.public String getJavaVersion()
null
if no java version is used (because the server
is down).null
if no java version is used (because the server
is down).public int getOpenConnections()
public Schema getSchema()
public Set<TaskEntry> getTaskEntries()
protected Schema readSchema() throws ConfigException, InitializationException, DirectoryException
ConfigException
- if an error occurs reading the schema.InitializationException
- if an error occurs initializing configuration to read schema.DirectoryException
- if there is an error registering the minimal objectclasses.protected List<VLVSortOrder> getVLVSortOrder(String s)
s
- the string in the configuration.protected Comparator<InetAddress> getInetAddressComparator()
protected boolean mustReadSchema()
true
if the schema must be read and false
otherwise.true
if the schema must be read and false
otherwise.Copyright 2010-2020 ForgeRock AS.