Class ConfigFromConnection
- java.lang.Object
-
- org.opends.guitools.controlpanel.util.ConfigReader
-
- org.opends.guitools.controlpanel.util.ConfigFromConnection
-
public class ConfigFromConnection extends ConfigReader
A class that reads the configuration and monitoring information using an LDAP connection.
-
-
Field Summary
-
Fields inherited from class org.opends.guitools.controlpanel.util.ConfigReader
adminConnector, administrativeUsers, backends, configFile, environmentSettingException, exceptions, isSchemaEnabled, javaVersion, listeners, numberConnections, replicationPort, schema, taskEntries
-
-
Constructor Summary
Constructors Constructor Description ConfigFromConnection()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchResultEntrygetEntryCaches()Returns the monitoring entry for the entry caches.SearchResultEntrygetJvmMemoryUsage()Returns the monitoring entry for the JVM memory usage.SearchResultEntrygetRootMonitor()Returns the root entry of the monitoring tree.SearchResultEntrygetSystemInformation()Returns the monitoring entry for the system information.SearchResultEntrygetVersionMonitor()Returns the version entry of the monitoring tree.SearchResultEntrygetWorkQueue()Returns the monitoring entry for the work queue.booleanisLocal()Returnstrueif we are trying to manage the local host andfalseotherwise.static DateFormatnewDateFormatter()Returns a date formatter to be used to format dates.static SimpleDateFormatnewUtcParser()Returns a date formatter to be used to parse GMT dates.voidreadConfiguration(ConnectionWrapper connWrapper)Reads configuration and monitoring information using the provided connection.voidsetIsLocal(boolean isLocal)Sets whether this server represents the local instance or a remote server.voidupdateTaskInformation(ConnectionWrapper connWrapper, List<Exception> ex, Collection<TaskEntry> ts)Updates the provided list of TaskEntry with the task entries found in a server.-
Methods inherited from class org.opends.guitools.controlpanel.util.ConfigReader
getAdminConnector, getAdministrativeUsers, getBackends, getConnectionHandlers, getExceptions, getInetAddressComparator, getJavaVersion, getOpenConnections, getReplicationPort, getSchema, getTaskEntries, getVLVSortOrder, isConfigRead, isSchemaEnabled, mustReadSchema, readSchema
-
-
-
-
Method Detail
-
newUtcParser
public static SimpleDateFormat newUtcParser()
Returns a date formatter to be used to parse GMT dates.A new instance is returned by each call because
SimpleDateFormatis not thread-safe and this method is called from several threads.- Returns:
- a date formatter to be used to parse GMT dates
-
newDateFormatter
public static DateFormat newDateFormatter()
Returns a date formatter to be used to format dates.A new instance is returned by each call because
DateFormatis not thread-safe and this method is called from several threads.- Returns:
- a date formatter to be used to format dates
-
getEntryCaches
public SearchResultEntry getEntryCaches()
Returns the monitoring entry for the entry caches.- Returns:
- the monitoring entry for the entry caches.
-
getJvmMemoryUsage
public SearchResultEntry getJvmMemoryUsage()
Returns the monitoring entry for the JVM memory usage.- Returns:
- the monitoring entry for the JVM memory usage.
-
getRootMonitor
public SearchResultEntry getRootMonitor()
Returns the root entry of the monitoring tree.- Returns:
- the root entry of the monitoring tree.
-
getVersionMonitor
public SearchResultEntry getVersionMonitor()
Returns the version entry of the monitoring tree.- Returns:
- the version entry of the monitoring tree.
-
getSystemInformation
public SearchResultEntry getSystemInformation()
Returns the monitoring entry for the system information.- Returns:
- the monitoring entry for the system information.
-
getWorkQueue
public SearchResultEntry getWorkQueue()
Returns the monitoring entry for the work queue.- Returns:
- the monitoring entry for the work queue.
-
setIsLocal
public void setIsLocal(boolean isLocal)
Sets whether this server represents the local instance or a remote server.- Parameters:
isLocal- whether this server represents the local instance or a remote server (in another machine or in another installation on the same machine).
-
isLocal
public boolean isLocal()
Returnstrueif we are trying to manage the local host andfalseotherwise.- Returns:
trueif we are trying to manage the local host andfalseotherwise.
-
readConfiguration
public void readConfiguration(ConnectionWrapper connWrapper)
Reads configuration and monitoring information using the provided connection.- Parameters:
connWrapper- the connection to be used to read the information.
-
updateTaskInformation
public void updateTaskInformation(ConnectionWrapper connWrapper, List<Exception> ex, Collection<TaskEntry> ts)
Updates the provided list of TaskEntry with the task entries found in a server.- Parameters:
connWrapper- the connection to the server.ex- the list of exceptions encountered while retrieving the task entries.ts- the list of task entries to be updated.
-
-