Troubleshoot > Work with Diagnostic Providers > Diagnostic ProvidersThe simpler interfaces provided by the Diagnostic Service MBean
All services for a Diagnostic Provider (DP) are also available through a JMX interface known as the Diagnostic Service interface. The Diagnostic Service interface enables administrators to drive methods against DPs using the Diagnostic Provider Name or Diagnostic Provider ID.
When formatted output is requested of the Diagnostic Service, it is localized to the client Locale. This makes the Diagnostic Service MBean ideal for clients using an interface where consuming complex Java objects, such as those returned from the Diagnostic Provider MBeans, is not feasible. An example of such an interface is wsadmin.
The Diagnostic Service interface provides four signatures for each of the key methods available on the Diagnostic Providers (configDump, stateDump, and selfDiagnostic) objects. Because these method signatures look so similar, this example shows it all through the configDump methods. The four Diagnostic Service methods that map to configDump on a Diagnostic Provider are:
public DiagnosticEvent [] configDump(String aDPName, String aAttributeIdSpec, boolean aRegisteredOnly) public DiagnosticEvent [] configDumpById(String aDPid, String aAttributeIdSpec, boolean aRegisteredOnly) public String [] configDumpFormatted(String aDPName, String aAttributeIdSpec, boolean aRegisteredOnly, Locale aLocale) public String [] configDumpFormattedById(String aDPid, String aAttributeIdSpec, boolean aRegisteredOnly, Locale aLocale) {The first two return exactly what the Diagnostic Provider does. The second two methods act as a pass-through to the actual Diagnostic Provider, but they take the array of Diagnostic Events the Diagnostic Provider returns, and convert it into a more are consumable String array. In addition, these methods handle localizing the output to the appropriate locale. It is important to note the same method can be driven using the Diagnostic Provider ID or the Diagnostic Provider Name.
Related
Work with Diagnostic Providers