Class ServerDescriptor
- java.lang.Object
-
- org.opends.guitools.controlpanel.datamodel.ServerDescriptor
-
public class ServerDescriptor extends Object
This is just a class used to provide a data model describing what the StatusPanelDialog will show to the user.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerDescriptor.ServerStatusEnumeration indicating the status of the server.
-
Constructor Summary
Constructors Constructor Description ServerDescriptor()Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanareSchemasEqual(Schema schema1, Schema schema2)Method used to compare schemas.booleanequals(Object o)ConnectionHandlerDescriptorgetAdminConnector()Returns the admin connector.Set<DN>getAdministrativeUsers()Return the administrative users.Set<BackendDescriptor>getBackends()Returns the backend descriptors of the server.Set<ConnectionHandlerDescriptor>getConnectionHandlers()Returns the listener descriptors of the server.SearchResultEntrygetEntryCachesMonitor()Returns the monitoring entry for the entry caches.List<Exception>getExceptions()Returns the exceptions that occurred while reading the configuration.StringgetHostname()Returns the host name of the server.StringgetInstallPath()Return the install path where the server is installed.StringgetInstancePath()Return the instance path where the server databases and configuration is located.StringgetJavaVersion()Return the java version used to run the server.SearchResultEntrygetJvmMemoryUsageMonitor()Returns the monitoring entry for the JVM memory usage.intgetOpenConnections()Returns the number of open connection in the server.StringgetOpenDSVersion()Returns the version of the server.SearchResultEntrygetRootMonitor()Returns the root entry of the monitoring tree.longgetRunningTime()Returns the running time of the server in milliseconds.SchemagetSchema()Returns the schema of the server.ServerDescriptor.ServerStatusgetStatus()Returns the status of the server.SearchResultEntrygetSystemInformationMonitor()Returns the monitoring entry for the system information.Set<TaskEntry>getTaskEntries()Returns the task entries.SearchResultEntrygetWorkQueueMonitor()Returns the monitoring entry for the work queue.inthashCode()booleanisAuthenticated()Return whether we were authenticated when retrieving the information of this ServerStatusDescriptor.booleanisLocal()Returns whether we are trying to manage the local host.booleanisSchemaEnabled()Returns whether the schema is enabled or not.booleanisWindows()Returns whether the server is running under a windows system or not.booleanisWindowsServiceEnabled()Tells whether the windows service is enabled or not.booleansameInstallAndInstance()Returns whether the install and the instance are on the same server or not.voidsetAdminConnector(ConnectionHandlerDescriptor adminConnector)Sets the admin connector.voidsetAdministrativeUsers(Set<DN> administrativeUsers)Set the administrative users.voidsetAuthenticated(boolean isAuthenticated)Sets whether we were authenticated when retrieving the information of this ServerStatusDescriptor.voidsetBackends(Set<BackendDescriptor> backends)Sets the backend descriptors of the server.voidsetConnectionHandlers(Set<ConnectionHandlerDescriptor> listeners)Sets the listener descriptors of the server.voidsetEntryCachesMonitor(SearchResultEntry entryCaches)Sets the monitoring entry for the entry caches.voidsetExceptions(Collection<Exception> exceptions)Sets the exceptions that occurred while reading the configuration.voidsetHostname(String hostName)Sets the host name of the server.voidsetInstallPath(String installPath)Sets the install path where the server is installed.voidsetInstancePath(String instancePath)Sets the instance path where the server databases and configuration is located.voidsetIsLocal(boolean isLocal)Sets whether this server represents the local instance or a remote server.voidsetJavaVersion(String javaVersion)Set the java version used to run the server.voidsetJvmMemoryUsageMonitor(SearchResultEntry jvmMemoryUsage)Sets the monitoring entry for the JVM memory usage.voidsetOpenConnections(int openConnections)Set the number of open connections.voidsetOpenDJVersion(String openDSVersion)Sets the version of the server.voidsetRootMonitor(SearchResultEntry rootMonitor)Sets the root entry of the monitoring tree.voidsetSchema(Schema schema)Sets the schema of the server.voidsetSchemaEnabled(boolean isSchemaEnabled)Sets whether the schema is enabled or not.voidsetStatus(ServerDescriptor.ServerStatus status)Sets the status of the server.voidsetSystemInformationMonitor(SearchResultEntry systemInformation)Sets the monitoring entry for the system information.voidsetTaskEntries(Set<TaskEntry> taskEntries)Sets the the task entries.voidsetWindowsServiceEnabled(boolean isWindowsServiceEnabled)Sets whether the windows service is enabled or not.voidsetWorkQueueMonitor(SearchResultEntry workQueue)Sets the monitoring entry of the work queue.StringtoString()
-
-
-
Method Detail
-
getAdministrativeUsers
public Set<DN> getAdministrativeUsers()
Return the administrative users.- Returns:
- the administrative users.
-
setAdministrativeUsers
public void setAdministrativeUsers(Set<DN> administrativeUsers)
Set the administrative users.- Parameters:
administrativeUsers- the administrative users to set
-
isSchemaEnabled
public boolean isSchemaEnabled()
Returns whether the schema is enabled or not.- Returns:
trueif the schema is enabled,falseotherwise.
-
setSchemaEnabled
public void setSchemaEnabled(boolean isSchemaEnabled)
Sets whether the schema is enabled or not.- Parameters:
isSchemaEnabled-trueif the schema is enabled,falseotherwise.
-
getInstancePath
public String getInstancePath()
Return the instance path where the server databases and configuration is located.- Returns:
- the instance path where the server databases and configuration is located
-
setInstancePath
public void setInstancePath(String instancePath)
Sets the instance path where the server databases and configuration is located.- Parameters:
instancePath- the instance path where the server databases and configuration is located.
-
getInstallPath
public String getInstallPath()
Return the install path where the server is installed.- Returns:
- the install path where the server is installed.
-
setInstallPath
public void setInstallPath(String installPath)
Sets the install path where the server is installed.- Parameters:
installPath- the install path where the server is installed.
-
sameInstallAndInstance
public boolean sameInstallAndInstance()
Returns whether the install and the instance are on the same server or not.- Returns:
- whether the install and the instance are on the same server or not.
-
getJavaVersion
public String getJavaVersion()
Return the java version used to run the server.- Returns:
- the java version used to run the server.
-
setJavaVersion
public void setJavaVersion(String javaVersion)
Set the java version used to run the server.- Parameters:
javaVersion- the java version used to run the server.
-
getOpenConnections
public int getOpenConnections()
Returns the number of open connection in the server.- Returns:
- the number of open connection in the server.
-
setOpenConnections
public void setOpenConnections(int openConnections)
Set the number of open connections.- Parameters:
openConnections- the number of open connections.
-
getOpenDSVersion
public String getOpenDSVersion()
Returns the version of the server.- Returns:
- the version of the server.
-
setOpenDJVersion
public void setOpenDJVersion(String openDSVersion)
Sets the version of the server.- Parameters:
openDSVersion- the version of the server.
-
getStatus
public ServerDescriptor.ServerStatus getStatus()
Returns the status of the server.- Returns:
- the status of the server.
-
setStatus
public void setStatus(ServerDescriptor.ServerStatus status)
Sets the status of the server.- Parameters:
status- the status of the server.
-
getTaskEntries
public Set<TaskEntry> getTaskEntries()
Returns the task entries.- Returns:
- the task entries.
-
setTaskEntries
public void setTaskEntries(Set<TaskEntry> taskEntries)
Sets the the task entries.- Parameters:
taskEntries- the task entries.
-
isAuthenticated
public boolean isAuthenticated()
Return whether we were authenticated when retrieving the information of this ServerStatusDescriptor.- Returns:
trueif we were authenticated when retrieving the information of this ServerStatusDescriptor andfalseotherwise.
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated)
Sets whether we were authenticated when retrieving the information of this ServerStatusDescriptor.- Parameters:
isAuthenticated- whether we were authenticated when retrieving the information of this ServerStatusDescriptor.
-
getBackends
public Set<BackendDescriptor> getBackends()
Returns the backend descriptors of the server.- Returns:
- the backend descriptors of the server.
-
setBackends
public void setBackends(Set<BackendDescriptor> backends)
Sets the backend descriptors of the server.- Parameters:
backends- the database descriptors to set.
-
getConnectionHandlers
public Set<ConnectionHandlerDescriptor> getConnectionHandlers()
Returns the listener descriptors of the server.- Returns:
- the listener descriptors of the server.
-
setConnectionHandlers
public void setConnectionHandlers(Set<ConnectionHandlerDescriptor> listeners)
Sets the listener descriptors of the server.- Parameters:
listeners- the listener descriptors to set.
-
setSchema
public void setSchema(Schema schema)
Sets the schema of the server.- Parameters:
schema- the schema of the server.
-
getSchema
public Schema getSchema()
Returns the schema of the server.- Returns:
- the schema of the server.
-
getHostname
public String getHostname()
Returns the host name of the server.- Returns:
- the host name of the server.
-
setHostname
public void setHostname(String hostName)
Sets the host name of the server.- Parameters:
hostName- the host name of the server.
-
isLocal
public boolean isLocal()
Returns whether we are trying to manage the local host.- Returns:
trueif we are trying to manage the local host,falseotherwise.
-
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).
-
getExceptions
public List<Exception> getExceptions()
Returns the exceptions that occurred while reading the configuration.- Returns:
- the exceptions that occurred while reading the configuration.
-
setExceptions
public void setExceptions(Collection<Exception> exceptions)
Sets the exceptions that occurred while reading the configuration.- Parameters:
exceptions- exceptions that occurred while reading the configuration.
-
isWindowsServiceEnabled
public boolean isWindowsServiceEnabled()
Tells whether the windows service is enabled or not.- Returns:
trueif the windows service is enabled,falseotherwise.
-
setWindowsServiceEnabled
public void setWindowsServiceEnabled(boolean isWindowsServiceEnabled)
Sets whether the windows service is enabled or not.- Parameters:
isWindowsServiceEnabled-trueif the windows service is enabled,falseotherwise.
-
isWindows
public boolean isWindows()
Returns whether the server is running under a windows system or not.- Returns:
- whether the server is running under a windows system or not.
-
areSchemasEqual
public static boolean areSchemasEqual(Schema schema1, Schema schema2)
Method used to compare schemas. Returns whether the two schemas are equal.- Parameters:
schema1- the first schema.schema2- the second schema.- Returns:
trueif the two schemas are equal,falseotherwise.
-
getAdminConnector
public ConnectionHandlerDescriptor getAdminConnector()
Returns the admin connector.- Returns:
- the admin connector.
-
setAdminConnector
public void setAdminConnector(ConnectionHandlerDescriptor adminConnector)
Sets the admin connector.- Parameters:
adminConnector- the admin connector.
-
setEntryCachesMonitor
public void setEntryCachesMonitor(SearchResultEntry entryCaches)
Sets the monitoring entry for the entry caches.- Parameters:
entryCaches- the monitoring entry for the entry caches.
-
setJvmMemoryUsageMonitor
public void setJvmMemoryUsageMonitor(SearchResultEntry jvmMemoryUsage)
Sets the monitoring entry for the JVM memory usage.- Parameters:
jvmMemoryUsage- the monitoring entry for the JVM memory usage.
-
setRootMonitor
public void setRootMonitor(SearchResultEntry rootMonitor)
Sets the root entry of the monitoring tree.- Parameters:
rootMonitor- the root entry of the monitoring tree.
-
getRunningTime
public long getRunningTime()
Returns the running time of the server in milliseconds. Returns -1 if no running time could be found.- Returns:
- the running time of the server in milliseconds.
-
setSystemInformationMonitor
public void setSystemInformationMonitor(SearchResultEntry systemInformation)
Sets the monitoring entry for the system information.- Parameters:
systemInformation- entry for the system information.
-
setWorkQueueMonitor
public void setWorkQueueMonitor(SearchResultEntry workQueue)
Sets the monitoring entry of the work queue.- Parameters:
workQueue- entry of the work queue.
-
getEntryCachesMonitor
public SearchResultEntry getEntryCachesMonitor()
Returns the monitoring entry for the entry caches.- Returns:
- the monitoring entry for the entry caches.
-
getJvmMemoryUsageMonitor
public SearchResultEntry getJvmMemoryUsageMonitor()
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.
-
getSystemInformationMonitor
public SearchResultEntry getSystemInformationMonitor()
Returns the monitoring entry for the system information.- Returns:
- the monitoring entry for the system information.
-
getWorkQueueMonitor
public SearchResultEntry getWorkQueueMonitor()
Returns the monitoring entry for the work queue.- Returns:
- the monitoring entry for the work queue.
-
-