The simpler interfaces provided by the Diagnostic Service MBean

 

+

Search Tips   |   Advanced Search

 

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 DP Name or DP 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 DP MBeans, is not feasible. An example of such an interface is the wsadmin tool.

The Diagnostic Service interface provides four signatures for each of the key methods available on the DP...

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 DP 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 DP does. The second two methods act as a pass-through to the actual DP, but they take the array of Diagnostic Events that the DP returns, and convert it into a more consumable String array. In addition, these methods handle localizing the output to the appropriate locale. It is important to note that the same method can be driven using the Diagnostic Provider ID or the DP Name.


 

Related tasks


Work with Diagnostic Providers