001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008-2010 Sun Microsystems, Inc.
025 *      Portions Copyright 2014-2015 ForgeRock AS
026 */
027package org.opends.guitools.controlpanel.datamodel;
028
029import java.io.File;
030import java.io.IOException;
031import java.util.ArrayList;
032import java.util.Collection;
033import java.util.Collections;
034import java.util.Date;
035import java.util.HashSet;
036import java.util.List;
037import java.util.Map;
038import java.util.Set;
039
040import org.opends.guitools.controlpanel.util.ConfigFromDirContext;
041import org.opends.quicksetup.UserData;
042import org.opends.server.tools.tasks.TaskEntry;
043import org.opends.server.types.AttributeType;
044import org.opends.server.types.DN;
045import org.opends.server.types.ObjectClass;
046import org.opends.server.types.OpenDsException;
047import org.opends.server.types.Schema;
048
049import com.forgerock.opendj.util.OperatingSystem;
050
051import static org.opends.guitools.controlpanel.datamodel.BasicMonitoringAttributes.*;
052import static org.opends.guitools.controlpanel.util.Utilities.*;
053import static org.opends.server.types.CommonSchemaElements.*;
054
055/**
056 * This is just a class used to provide a data model describing what the
057 * StatusPanelDialog will show to the user.
058 */
059public class ServerDescriptor
060{
061  private static String localHostName = UserData.getDefaultHostName();
062
063  private ServerStatus status;
064  private int openConnections;
065  private Set<BackendDescriptor> backends = new HashSet<>();
066  private Set<ConnectionHandlerDescriptor> listeners = new HashSet<>();
067  private ConnectionHandlerDescriptor adminConnector;
068  private Set<DN> administrativeUsers = new HashSet<>();
069  private String installPath;
070  private String instancePath;
071  private String openDSVersion;
072  private String javaVersion;
073  private ArrayList<OpenDsException> exceptions = new ArrayList<>();
074  private boolean isWindowsServiceEnabled;
075  private boolean isSchemaEnabled;
076  private Schema schema;
077
078  private CustomSearchResult rootMonitor;
079  private CustomSearchResult jvmMemoryUsage;
080  private CustomSearchResult systemInformation;
081  private CustomSearchResult entryCaches;
082  private CustomSearchResult workQueue;
083
084  private Set<TaskEntry> taskEntries = new HashSet<>();
085
086  private long runningTime = -1;
087  private boolean isAuthenticated;
088  private String hostName = localHostName;
089  private boolean isLocal = true;
090
091  /** Enumeration indicating the status of the server. */
092  public enum ServerStatus
093  {
094    /** Server Started. */
095    STARTED,
096    /** Server Stopped. */
097    STOPPED,
098    /** Server Starting. */
099    STARTING,
100    /** Server Stopping. */
101    STOPPING,
102    /** Not connected to remote. */
103    NOT_CONNECTED_TO_REMOTE,
104    /** Status Unknown. */
105    UNKNOWN
106  }
107
108  /** Default constructor. */
109  public ServerDescriptor()
110  {
111  }
112
113  /**
114   * Return the administrative users.
115   * @return the administrative users.
116   */
117  public Set<DN> getAdministrativeUsers()
118  {
119    return administrativeUsers;
120  }
121
122  /**
123   * Set the administrative users.
124   * @param administrativeUsers the administrative users to set
125   */
126  public void setAdministrativeUsers(Set<DN> administrativeUsers)
127  {
128    this.administrativeUsers = Collections.unmodifiableSet(administrativeUsers);
129  }
130
131  /**
132   * Returns whether the schema is enabled or not.
133   * @return <CODE>true</CODE> if the schema is enabled and <CODE>false</CODE>
134   * otherwise.
135   */
136  public boolean isSchemaEnabled()
137  {
138    return isSchemaEnabled;
139  }
140
141  /**
142   * Sets whether the schema is enabled or not.
143   * @param isSchemaEnabled <CODE>true</CODE> if the schema is enabled and
144   * <CODE>false</CODE> otherwise.
145   */
146  public void setSchemaEnabled(boolean isSchemaEnabled)
147  {
148    this.isSchemaEnabled = isSchemaEnabled;
149  }
150
151  /**
152   * Return the instance path where the server databases and configuration is
153   * located.
154   * @return the instance path where the server databases and configuration is
155   * located
156   */
157  public String getInstancePath()
158  {
159    return instancePath;
160  }
161
162  /**
163   * Sets the instance path where the server databases and configuration is
164   * located.
165   * @param instancePath the instance path where the server databases and
166   * configuration is located.
167   */
168  public void setInstancePath(String instancePath)
169  {
170    this.instancePath = instancePath;
171  }
172
173  /**
174   * Return the install path where the server is installed.
175   * @return the install path where the server is installed.
176   */
177  public String getInstallPath()
178  {
179    return installPath;
180  }
181
182  /**
183   * Sets the install path where the server is installed.
184   * @param installPath the install path where the server is installed.
185   */
186  public void setInstallPath(String installPath)
187  {
188    this.installPath = installPath;
189  }
190
191  /**
192   * Returns whether the install and the instance are on the same server
193   * or not.
194   * @return whether the install and the instance are on the same server
195   * or not.
196   */
197  public boolean sameInstallAndInstance()
198  {
199    boolean sameInstallAndInstance;
200    String instance = getInstancePath();
201    String install = getInstallPath();
202    try
203    {
204      if (instance != null)
205      {
206        sameInstallAndInstance = instance.equals(install);
207        if (!sameInstallAndInstance &&
208            (isLocal() || OperatingSystem.isWindows()))
209        {
210          File f1 = new File(instance);
211          File f2 = new File(install);
212          sameInstallAndInstance =
213            f1.getCanonicalFile().equals(f2.getCanonicalFile());
214        }
215      }
216      else
217      {
218        sameInstallAndInstance = install == null;
219      }
220    }
221    catch (IOException ioe)
222    {
223      sameInstallAndInstance = false;
224    }
225    return sameInstallAndInstance;
226  }
227
228  /**
229   * Return the java version used to run the server.
230   * @return the java version used to run the server.
231   */
232  public String getJavaVersion()
233  {
234    return javaVersion;
235  }
236
237  /**
238   * Set the java version used to run the server.
239   * @param javaVersion the java version used to run the server.
240   */
241  public void setJavaVersion(String javaVersion)
242  {
243    this.javaVersion = javaVersion;
244  }
245
246  /**
247   * Returns the number of open connection in the server.
248   * @return the number of open connection in the server.
249   */
250  public int getOpenConnections()
251  {
252    return openConnections;
253  }
254
255  /**
256   * Set the number of open connections.
257   * @param openConnections the number of open connections.
258   */
259  public void setOpenConnections(int openConnections)
260  {
261    this.openConnections = openConnections;
262  }
263
264  /**
265   * Returns the version of the server.
266   * @return the version of the server.
267   */
268  public String getOpenDSVersion()
269  {
270    return openDSVersion;
271  }
272
273  /**
274   * Sets the version of the server.
275   * @param openDSVersion the version of the server.
276   */
277  public void setOpenDSVersion(String openDSVersion)
278  {
279    this.openDSVersion = openDSVersion;
280  }
281
282  /**
283   * Returns the status of the server.
284   * @return the status of the server.
285   */
286  public ServerStatus getStatus()
287  {
288    return status;
289  }
290
291  /**
292   * Sets the status of the server.
293   * @param status the status of the server.
294   */
295  public void setStatus(ServerStatus status)
296  {
297    this.status = status;
298  }
299
300  /**
301   * Returns the task entries.
302   * @return the task entries.
303   */
304  public Set<TaskEntry> getTaskEntries()
305  {
306    return taskEntries;
307  }
308
309  /**
310   * Sets the the task entries.
311   * @param taskEntries the task entries.
312   */
313  public void setTaskEntries(Set<TaskEntry> taskEntries)
314  {
315    this.taskEntries = Collections.unmodifiableSet(taskEntries);
316  }
317
318  /** {@inheritDoc} */
319  @Override
320  public boolean equals(Object o)
321  {
322    if (this == o)
323    {
324      return true;
325    }
326    if (!(o instanceof ServerDescriptor))
327    {
328      return false;
329    }
330
331    ServerDescriptor desc = (ServerDescriptor) o;
332    return desc.getStatus() == getStatus()
333        && desc.isLocal() == isLocal()
334        && desc.isAuthenticated() == isAuthenticated()
335        && desc.getOpenConnections() == getOpenConnections()
336        && areEqual(getInstallPath(), desc.getInstallPath())
337        && areEqual(getInstancePath(), desc.getInstancePath())
338        && areEqual(getJavaVersion(), desc.getJavaVersion())
339        && areEqual(getOpenDSVersion(), desc.getOpenDSVersion())
340        && areEqual(desc.getAdministrativeUsers(), getAdministrativeUsers())
341        && areEqual(desc.getConnectionHandlers(), getConnectionHandlers())
342        && areEqual(desc.getBackends(), getBackends())
343        && areEqual(desc.getExceptions(), getExceptions())
344        && desc.isSchemaEnabled() == isSchemaEnabled()
345        && areSchemasEqual(getSchema(), desc.getSchema())
346        && (!OperatingSystem.isWindows() || desc.isWindowsServiceEnabled() == isWindowsServiceEnabled())
347        && desc.getTaskEntries().equals(getTaskEntries());
348  }
349
350  /** {@inheritDoc} */
351  @Override
352  public int hashCode()
353  {
354    String s = installPath + openDSVersion + javaVersion + isAuthenticated;
355    return status.hashCode() + openConnections + s.hashCode();
356  }
357
358  /**
359   * Return whether we were authenticated when retrieving the information of
360   * this ServerStatusDescriptor.
361   * @return <CODE>true</CODE> if we were authenticated when retrieving the
362   * information of this ServerStatusDescriptor and <CODE>false</CODE>
363   * otherwise.
364   */
365  public boolean isAuthenticated()
366  {
367    return isAuthenticated;
368  }
369
370  /**
371   * Sets whether we were authenticated when retrieving the information of
372   * this ServerStatusDescriptor.
373   * @param isAuthenticated whether we were authenticated when retrieving the
374   * information of this ServerStatusDescriptor.
375   */
376  public void setAuthenticated(boolean isAuthenticated)
377  {
378    this.isAuthenticated = isAuthenticated;
379  }
380
381  /**
382   * Returns the backend descriptors of the server.
383   * @return the backend descriptors of the server.
384   */
385  public Set<BackendDescriptor> getBackends()
386  {
387    return backends;
388  }
389
390  /**
391   * Sets the backend descriptors of the server.
392   * @param backends the database descriptors to set.
393   */
394  public void setBackends(Set<BackendDescriptor> backends)
395  {
396    this.backends = Collections.unmodifiableSet(backends);
397  }
398
399  /**
400   * Returns the listener descriptors of the server.
401   * @return the listener descriptors of the server.
402   */
403  public Set<ConnectionHandlerDescriptor> getConnectionHandlers()
404  {
405    return listeners;
406  }
407
408  /**
409   * Sets the listener descriptors of the server.
410   * @param listeners the listener descriptors to set.
411   */
412  public void setConnectionHandlers(Set<ConnectionHandlerDescriptor> listeners)
413  {
414    this.listeners = Collections.unmodifiableSet(listeners);
415  }
416
417  /**
418   * Sets the schema of the server.
419   * @param schema the schema of the server.
420   */
421  public void setSchema(Schema schema)
422  {
423    this.schema = schema;
424  }
425
426  /**
427   * Returns the schema of the server.
428   * @return the schema of the server.
429   */
430  public Schema getSchema()
431  {
432    return schema;
433  }
434
435  /**
436   * Returns the host name of the server.
437   * @return the host name of the server.
438   */
439  public String getHostname()
440  {
441    return hostName;
442  }
443
444  /**
445   * Sets the host name of the server.
446   * @param hostName the host name of the server.
447   */
448  public void setHostname(String hostName)
449  {
450    this.hostName = hostName;
451  }
452
453  /**
454   * Returns <CODE>true</CODE> if we are trying to manage the local host and
455   * <CODE>false</CODE> otherwise.
456   * @return <CODE>true</CODE> if we are trying to manage the local host and
457   * <CODE>false</CODE> otherwise.
458   */
459  public boolean isLocal()
460  {
461    return isLocal;
462  }
463
464  /**
465   * Sets whether this server represents the local instance or a remote server.
466   * @param isLocal whether this server represents the local instance or a
467   * remote server (in another machine or in another installation on the same
468   * machine).
469   */
470  public void setIsLocal(boolean isLocal)
471  {
472    this.isLocal = isLocal;
473  }
474
475  /**
476   * Returns the exceptions that occurred while reading the configuration.
477   * @return the exceptions that occurred while reading the configuration.
478   */
479  public List<OpenDsException> getExceptions()
480  {
481    return Collections.unmodifiableList(exceptions);
482  }
483
484  /**
485   * Sets the exceptions that occurred while reading the configuration.
486   * @param exceptions exceptions that occurred while reading the
487   * configuration.
488   */
489  public void setExceptions(Collection<OpenDsException> exceptions)
490  {
491    this.exceptions.clear();
492    this.exceptions.addAll(exceptions);
493  }
494
495  /**
496   * Tells whether the windows service is enabled or not.
497   * @return <CODE>true</CODE> if the windows service is enabled and
498   * <CODE>false</CODE> otherwise.
499   */
500  public boolean isWindowsServiceEnabled()
501  {
502    return isWindowsServiceEnabled;
503  }
504
505  /**
506   * Sets whether the windows service is enabled or not.
507   * @param isWindowsServiceEnabled <CODE>true</CODE> if the windows service is
508   * enabled and <CODE>false</CODE> otherwise.
509   */
510  public void setWindowsServiceEnabled(boolean isWindowsServiceEnabled)
511  {
512    this.isWindowsServiceEnabled = isWindowsServiceEnabled;
513  }
514
515  /**
516   * Returns whether the server is running under a windows system or not.
517   * @return whether the server is running under a windows system or not.
518   */
519  public boolean isWindows()
520  {
521    if (isLocal())
522    {
523      return OperatingSystem.isWindows();
524    }
525    CustomSearchResult sr = getSystemInformationMonitor();
526    if (sr == null)
527    {
528      return false;
529    }
530    String os = getFirstValueAsString(sr, "operatingSystem");
531    return os != null && OperatingSystem.WINDOWS.equals(OperatingSystem.forName(os));
532  }
533
534  /**
535   * Method used to compare schemas.
536   * Returns <CODE>true</CODE> if the two schemas are equal and
537   * <CODE>false</CODE> otherwise.
538   * @param schema1 the first schema.
539   * @param schema2 the second schema.
540   * @return <CODE>true</CODE> if the two schemas are equal and
541   * <CODE>false</CODE> otherwise.
542   */
543  public static boolean areSchemasEqual(Schema schema1, Schema schema2)
544  {
545    if (schema1 == schema2)
546    {
547      return true;
548    }
549    else if (schema2 == null)
550    {
551      return schema1 != null;
552    }
553    else if (schema1 == null)
554    {
555      return false;
556    }
557
558    return areAttributeTypesEqual(schema1, schema2)
559        && areObjectClassesEqual(schema1, schema2)
560        && areEqual(schema1.getMatchingRules(), schema2.getMatchingRules())
561        && areEqual(schema1.getSyntaxes(), schema2.getSyntaxes());
562  }
563
564  private static boolean areAttributeTypesEqual(Schema schema1, Schema schema2)
565  {
566    final Map<String, AttributeType> attrs1 = schema1.getAttributeTypes();
567    final Map<String, AttributeType> attrs2 = schema2.getAttributeTypes();
568    if (attrs1.size() != attrs2.size())
569    {
570      return false;
571    }
572    for (String name : attrs1.keySet())
573    {
574      AttributeType attr1 = attrs1.get(name);
575      AttributeType attr2 = attrs2.get(name);
576      if (attr2 == null && !areAttributesEqual(attr1, attr2))
577      {
578        return false;
579      }
580    }
581    return true;
582  }
583
584  private static boolean areObjectClassesEqual(Schema schema1, Schema schema2)
585  {
586    final Map<String, ObjectClass> ocs1 = schema1.getObjectClasses();
587    final Map<String, ObjectClass> ocs2 = schema2.getObjectClasses();
588    if (ocs1.size() != ocs2.size())
589    {
590      return false;
591    }
592    for (String name : ocs1.keySet())
593    {
594      ObjectClass oc1 = ocs1.get(name);
595      ObjectClass oc2 = ocs2.get(name);
596      if (oc2 == null || !areObjectClassesEqual(oc1, oc2))
597      {
598        return false;
599      }
600    }
601    return true;
602  }
603
604  /**
605   * Method used to compare attributes defined in the schema.
606   * Returns <CODE>true</CODE> if the two schema attributes are equal and
607   * <CODE>false</CODE> otherwise.
608   * @param schema1 the first schema attribute.
609   * @param schema2 the second schema attribute.
610   * @return <CODE>true</CODE> if the two schema attributes are equal and
611   * <CODE>false</CODE> otherwise.
612   */
613  private static boolean areAttributesEqual(AttributeType attr1, AttributeType attr2)
614  {
615    return attr1.getOID().equals(attr2.getOID())
616        && attr1.isCollective() == attr2.isCollective()
617        && attr1.isNoUserModification() == attr2.isNoUserModification()
618        && attr1.isObjectClass() == attr2.isObjectClass()
619        && attr1.isObsolete() == attr2.isObsolete()
620        && attr1.isOperational() == attr2.isOperational()
621        && attr1.isSingleValue() == attr2.isSingleValue()
622        && areEqual(attr1.getApproximateMatchingRule(), attr2.getApproximateMatchingRule())
623        && areEqual(getDefinitionWithFileName(attr1), getDefinitionWithFileName(attr2))
624        && areEqual(attr1.getDescription(), attr2.getDescription())
625        && areEqual(attr1.getEqualityMatchingRule(), attr2.getEqualityMatchingRule())
626        && areEqual(attr1.getOrderingMatchingRule(), attr2.getOrderingMatchingRule())
627        && areEqual(attr1.getSubstringMatchingRule(), attr2.getSubstringMatchingRule())
628        && areEqual(attr1.getSuperiorType(), attr2.getSuperiorType())
629        && areEqual(attr1.getSyntax(), attr2.getSyntax())
630        && areEqual(attr1.getSyntax().getOID(), attr2.getSyntax().getOID())
631        && areEqual(attr1.getExtraProperties().keySet(), attr2.getExtraProperties().keySet())
632        && areEqual(toSet(attr1.getNormalizedNames()), toSet(attr2.getNormalizedNames()))
633        && areEqual(toSet(attr1.getUserDefinedNames()), toSet(attr2.getUserDefinedNames()));
634  }
635
636  /**
637   * Method used to compare objectclasses defined in the schema.
638   * Returns <CODE>true</CODE> if the two schema objectclasses are equal and
639   * <CODE>false</CODE> otherwise.
640   * @param schema1 the first schema objectclass.
641   * @param schema2 the second schema objectclass.
642   * @return <CODE>true</CODE> if the two schema objectclasses are equal and
643   * <CODE>false</CODE> otherwise.
644   */
645  private static boolean areObjectClassesEqual(ObjectClass oc1, ObjectClass oc2)
646  {
647    return oc1.getOID().equals(oc2.getOID())
648        && oc1.isExtensibleObject() == oc2.isExtensibleObject()
649        && areEqual(getDefinitionWithFileName(oc1), getDefinitionWithFileName(oc2))
650        && areEqual(oc1.getDescription(), oc2.getDescription())
651        && areEqual(oc1.getObjectClassType(), oc2.getObjectClassType())
652        && areEqual(oc1.getOptionalAttributes(), oc2.getOptionalAttributes())
653        && areEqual(oc1.getRequiredAttributes(), oc2.getRequiredAttributes())
654        && areEqual(oc1.getSuperiorClasses(), oc2.getSuperiorClasses())
655        && areEqual(oc1.getExtraProperties().keySet(), oc2.getExtraProperties().keySet())
656        && areEqual(toSet(oc1.getNormalizedNames()), toSet(oc2.getNormalizedNames()))
657        && areEqual(toSet(oc1.getUserDefinedNames()), toSet(oc2.getUserDefinedNames()));
658  }
659
660  private static Set<Object> toSet(Iterable<?> iterable)
661  {
662    Set<Object> s = new HashSet<>();
663    for (Object o : iterable)
664    {
665      s.add(o);
666    }
667    return s;
668  }
669
670  /**
671   * Commodity method used to compare two objects that might be
672   * <CODE>null</CODE>.
673   * @param o1 the first object.
674   * @param o2 the second object.
675   * @return if both objects are <CODE>null</CODE> returns true.  If not returns
676   * <CODE>true</CODE> if both objects are equal according to the Object.equal
677   * method and <CODE>false</CODE> otherwise.
678   */
679  private static boolean areEqual(Object o1, Object o2)
680  {
681    if (o1 != null)
682    {
683      return o1.equals(o2);
684    }
685    return o2 == null;
686  }
687
688  /**
689   * Returns the admin connector.
690   * @return the admin connector.
691   */
692  public ConnectionHandlerDescriptor getAdminConnector()
693  {
694    return adminConnector;
695  }
696
697  /**
698   * Sets the admin connector.
699   * @param adminConnector the admin connector.
700   */
701  public void setAdminConnector(ConnectionHandlerDescriptor adminConnector)
702  {
703    this.adminConnector = adminConnector;
704  }
705
706  /**
707   * Sets the monitoring entry for the entry caches.
708   * @param entryCaches the monitoring entry for the entry caches.
709   */
710  public void setEntryCachesMonitor(CustomSearchResult entryCaches)
711  {
712    this.entryCaches = entryCaches;
713  }
714
715  /**
716   * Sets the monitoring entry for the JVM memory usage.
717   * @param jvmMemoryUsage the monitoring entry for the JVM memory usage.
718   */
719  public void setJvmMemoryUsageMonitor(CustomSearchResult jvmMemoryUsage)
720  {
721    this.jvmMemoryUsage = jvmMemoryUsage;
722  }
723
724  /**
725   * Sets the root entry of the monitoring tree.
726   * @param rootMonitor the root entry of the monitoring tree.
727   */
728  public void setRootMonitor(CustomSearchResult rootMonitor)
729  {
730    this.rootMonitor = rootMonitor;
731    runningTime = computeRunningTime(rootMonitor);
732  }
733
734  private long computeRunningTime(CustomSearchResult rootMonitor)
735  {
736    if (rootMonitor != null)
737    {
738      try
739      {
740        String start = getFirstValueAsString(rootMonitor, START_DATE.getAttributeName());
741        String current = getFirstValueAsString(rootMonitor, CURRENT_DATE.getAttributeName());
742        Date startTime = ConfigFromDirContext.utcParser.parse(start);
743        Date currentTime = ConfigFromDirContext.utcParser.parse(current);
744        return currentTime.getTime() - startTime.getTime();
745      }
746      catch (Throwable t)
747      {
748        return -1;
749      }
750    }
751    return -1;
752  }
753
754  /**
755   * Returns the running time of the server in milliseconds.  Returns -1 if
756   * no running time could be found.
757   * @return the running time of the server in milliseconds.
758   */
759  public long getRunningTime()
760  {
761    return runningTime;
762  }
763
764  /**
765   * Sets the monitoring entry for the system information.
766   * @param systemInformation entry for the system information.
767   */
768  public void setSystemInformationMonitor(CustomSearchResult systemInformation)
769  {
770    this.systemInformation = systemInformation;
771  }
772
773  /**
774   * Sets the monitoring entry of the work queue.
775   * @param workQueue entry of the work queue.
776   */
777  public void setWorkQueueMonitor(CustomSearchResult workQueue)
778  {
779    this.workQueue = workQueue;
780  }
781
782  /**
783   * Returns the monitoring entry for the entry caches.
784   * @return the monitoring entry for the entry caches.
785   */
786  public CustomSearchResult getEntryCachesMonitor()
787  {
788    return entryCaches;
789  }
790
791  /**
792   * Returns the monitoring entry for the JVM memory usage.
793   * @return the monitoring entry for the JVM memory usage.
794   */
795  public CustomSearchResult getJvmMemoryUsageMonitor()
796  {
797    return jvmMemoryUsage;
798  }
799
800  /**
801   * Returns the root entry of the monitoring tree.
802   * @return the root entry of the monitoring tree.
803   */
804  public CustomSearchResult getRootMonitor()
805  {
806    return rootMonitor;
807  }
808
809  /**
810   * Returns the monitoring entry for the system information.
811   * @return the monitoring entry for the system information.
812   */
813  public CustomSearchResult getSystemInformationMonitor()
814  {
815    return systemInformation;
816  }
817
818  /**
819   * Returns the monitoring entry for the work queue.
820   * @return the monitoring entry for the work queue.
821   */
822  public CustomSearchResult getWorkQueueMonitor()
823  {
824    return workQueue;
825  }
826}