[Mc4j-cvs] mc4j/doc-build/dashboard-dev DashboardComponents.xml,NONE,1.1 DashboardXML.xml,NONE,1.1 i
Brought to you by:
ghinkl
From: Greg H. <gh...@us...> - 2004-04-08 22:25:34
|
Update of /cvsroot/mc4j/mc4j/doc-build/dashboard-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25310/doc-build/dashboard-dev Added Files: DashboardComponents.xml DashboardXML.xml index.xml module.xml Log Message: New docs for the 1.2beta5 release. New dashboard guide section for building dashboards. New doc for OC4J connections. --- NEW FILE: index.xml --- <?xml version="1.0"?> <!DOCTYPE document [ <!ENTITY CarbonModule SYSTEM "module.xml"> ]> <document url="index.html"> &CarbonModule; <properties> <author email="gh...@sa...">Greg Hinkle</author> <created>April 2004</created> <title>Dashboard Development Guide</title> <version>$Revision: 1.1 $($Author: ghinkl $ / $Date: 2004/04/08 22:12:21 $)</version> </properties> <body> <section name="Introduction"> <p> This guide is meant to help in the construction of new dashboads and dashboard components. These features allow one to customize and extend MC4J to create new ways of looking at and managing systems. </p> <p> Custom views can be created for the features built into specific servers like JBoss or WebSphere. Views can also be created for custom components running withing those servers. </p> <subsection name="What is a dashboard?"> <p> A dashboard is a custom view of one or more MBeans that can be viewed through JMX. This custom view is meant to be flexible and customizable while also providing a rich interface to the underlying functionality. MC4J constructs the Swing components that make up a dashboard by parsing an XML file that defines its layout and properties. The following sections will describe the creation and customization of those files as well as the special components that they use. </p> <p> The capabilities of a dashboard should be anything that is possible within the framework of JMX. This should include reading or updating attributes, executing operations and listening for notifications. All of these typical jmx operations are done through the MC4J node framework in which an MBean is represented by an object that can execute these features on behalf of a dashboard. </p> <p> <i>If you create interesting or useful dashboards for any of the major servers or services, please consider donating them back for all to use.</i> </p> </subsection> </section> <section name="Sections"> <ul> <li><a href="DashboardXML.html">Dashboard XML</a></li> <li><a href="DashboardComponents.html">Dashboard Components</a></li> </ul> </section> </body> </document> --- NEW FILE: DashboardComponents.xml --- <?xml version="1.0"?> <!DOCTYPE document [ <!ENTITY CarbonModule SYSTEM "module.xml"> <!ENTITY nbsp " "> ]> <document url="DashboardComponents.html"> &CarbonModule; <properties> <author email="gh...@sa...">Greg Hinkle</author> <created>April 2004</created> <title>Dashboard Components</title> <version>$Revision: 1.1 $($Author: ghinkl $ / $Date: 2004/04/08 22:12:21 $)</version> </properties> <body> <section name="Overview"> <p> This document describes what a dashboard component is, what components are include with MC4J and how to create new ones. </p> </section> <section name="Dashboard Components"> <p> A dashboard component is an implementation of <i>org.mc4j.console.dashboard.DashboardComponent</i>. It must also extend <i>javax.swing.JComponent</i>. A dashboard component follows a special lifecyle in order to be properly configured and then displayed. First the component is instantiated through the use of a <i>Component</i> tag in a dashboard xml file. The instantiation is done through reflection based on the <b>type</b> attribute of the <i>Component</i> tag. </p> <p> Next, a Component has attributes and borders set on it via <i>Attribute</i> and <i>Border</i> tags. </p> <p> A child <i>Content</i> tag may hold a list of child components that will be added to this component. The layout manger for the component will also be set using the <i>LayoutManager</i> tag. </p> <p> Finally, a component is added to its parent using any constraints specified by a <i>Constraint</i> tag. </p> </section> <Section name="Standard Components"> <p> The following are the standard set of Dashboard Components that can be used to construct Dashboard views. </p> <subsection name="AttributeListComponent"> </subsection> <subsection name="AttributeTableComponent"> </subsection> <subsection name="AttributeTreeTableExplorer"> </subsection> <subsection name="BeanListComponent"> </subsection> <subsection name="MBeanTreeComponent"> </subsection> <subsection name="NumericAttributeGaugeMeter"></subsection> <subsection name="NumericAttributeGraph"></subsection> <subsection name="NumericAttributeMeter"></subsection> <subsection name="OperationListComponent"></subsection> <subsection name="RefreshControlComponent"></subsection> <subsection name="RelationsGraphComponent"></subsection> </Section> </body> </document> --- NEW FILE: DashboardXML.xml --- <?xml version="1.0"?> <!DOCTYPE document [ <!ENTITY CarbonModule SYSTEM "module.xml"> <!ENTITY nbsp " "> ]> <document url="DashboardXML.html"> &CarbonModule; <properties> <author email="gh...@sa...">Greg Hinkle</author> <created>April 2004</created> <title>Dashboard XML Files</title> <version>$Revision: 1.1 $($Author: ghinkl $ / $Date: 2004/04/08 22:12:21 $)</version> </properties> <body> <section name="Overview"> <p> This document describes the XML file that defines a dashboard custom view within MC4J. Dashboards have two primary sections that define how they behave and how they look. These are the <i>DashboardMatch</i> and <i>Content</i> sections. </p> </section> <section name="DashboardMatch Section"> <p> The <i>DashboardMatch</i> section defines how the custom view for a dashboard is attached to the specific MBeans or managed beans that it will display. Some dashboards will display information from only a single bean, while others will display from entire lists of beans. This section defines how that connection is made. </p> <subsection name="Dashboard Types"> <p> There are two primary types of dashboards. <b>Global</b> dashboards are designed to be often useful and are accessed from their own tree structure within a connection. <b>Bean</b> dashboards are used to display a custom view of a single MBean and are only available by right-clicking on that bean. <b>Global</b> dashboards can be <i>matched</i> to one or many beans. </p> </subsection> <subsection name="Matching Overview"> <p> A match is defined by conditions that are used to link a dashboard XML to MBeans. A dashboard is only made available to view if its matches are succesful and it has beans to display. This allows you to create dashboards for many situations and MBeans and MC4J will only display them when appropriate. </p> <p> Matching is done through a <i>BeanMatch</i> section within a <i>DashboardMatch</i> section. A <i>BeanMatch</i> uses one or more conditions to assign one or a list of MBeans to a special <b>id</b> within the dashboard. If no beans match all of the conditions in a <i>BeanMatch</i>, the match is considered unfulfilled and the Dashboard will not display. </p> <p> The <b>id</b> to which a match is set is later used by the view components to select which of the matched MBeans will be used. This allows you to match many beans and then assign them to each component as appropriate. The <b>type</b> of a <i>BeanMatch</i> is used to tell MC4J whether to look for a single matching MBean or a whole list of them. Set <b>type</b> to "Single" if you want to match only one MBean or "Multiple" if you want to match a whole list. </p> </subsection> <subsection name="Conditions"> <p> There are three types of conditions currently supported though more will be available soon. <dl> <dt>BeanObjectNameCondition</dt> <dd>This type matches to the object name of an MBean and will be the most often used type of condition. With this type, you also specify a <b>filter</b> attribute that contains a regular expression used to match to the MBean Name.</dd> <dt>ServerAttributeCondition</dt> <dd>This type matches to a specific server type in MC4J, as defined in the server connection drop-down list. You must specify the <b>serverType</b> atribute to match this condition.</dd> <dt></dt> </dl> </p> </subsection> <subsection name="Match example"> <p> The following match example is a <i>Bean</i> type match that will display for every MBean in the system. This is because of the ".*" regex used as the filter. This dashboard will not display within the Global section of the dashboards. </p> <pre> <DashboardMatch type="Bean"> <BeanMatch id="BeanNode" type="Single"> <Condition type="BeanObjectNameCondition" filter=".*"/> </BeanMatch> </DashboardMatch> </pre> <p> The following match example is a <i>Global</i> type of dashboard that will display within the global section only if an MBean with the name "jboss.jetty:Server=0" is found. If that bean is available, then this dashboard will be matched to it and only it. </p> <pre> <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> <Condition type="BeanObjectNameCondition" filter="^jboss.jetty:Server=0$"/> </BeanMatch> </DashboardMatch> </pre> <p> This final example is a <i>Global</i> dashboard that matches to a whole list of MBeans, any that include "j2eeType=Servlet" in their name. </p> <pre> <DashboardMatch type="Global" location="/Tomcat/Web"> <BeanMatch id="ServletList" type="Multiple"> <Condition type="BeanObjectNameCondition" filter="j2eeType=Servlet"/> <Condition type="ServerAttributeCondition" serverType="MX4J"/> </BeanMatch> </DashboardMatch> </pre> </subsection> </section> <section name="Content Section"> <p> The content section is the part of a dashboard that lays out the Swing components for display and sets their attributes. The dashboard xml specification has ways to set most of the typical properties of a JavaBean. You can also work with typical container features like creating Borders, setting constraints and setting layout managers. The XML specification is designed to be as simple and human-readable as possible. This is the primary reason it is different then the JavaBeans XML serialization spec. The latest DTD for dashboards is available at <a href="http://mc4j.sourceforge.net/Dashboard_1_0.dtd">Dashboard.dtd</a>. </p> <pre> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <Dashboard version="1.0" name="Basic MBean View"> <Description>Displays general information about any MBean in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="BeanNode" type="Single"> <Condition type="BeanObjectNameCondition" filter=".*"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <b><!-- *** The header section displays title and a refresh control *** --></b> <Component type="javax.swing.JPanel"> <Constraint type="BorderConstraints" direction="NORTH"/> <LayoutManager type="java.awt.BorderLayout"/> <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> <Content> <Component type="javax.swing.JPanel"> <Constraint type="BorderConstraints" direction="CENTER"/> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="javax.swing.JLabel" id="titleLable"> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="text" value="DashboardName"/> <Attribute name="font" value="(Literal)SansSerif bold 20"/> <Attribute name="foreground" value="(Literal)0x666666"/> </Component> <Component type="javax.swing.JTextArea"> <Constraint type="BorderConstraints" direction="SOUTH"/> <Attribute name="text" value="DashboardDescription"/> <Attribute name="font" value="(Literal)DialogInput bold 14"/> <Attribute name="opaque" value="(Literal)false"/> <Attribute name="editable" value="(Literal)false"/> </Component> </Content> </Component> <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> <Constraint type="BorderConstraints" direction="EAST"/> <Attribute name="refreshDelay" value="(Literal)30000"/> </Component> </Content> </Component> <b><!-- *** The main content is displayed within a scrollpane for easy viewing *** --></b> <Component type="javax.swing.JScrollPane"> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> <Content> <Component type="javax.swing.JPanel"> <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.BoxLayout" axis="Y_AXIS"/> <Content> <b><!-- *** A Section holder is an included component for providing hide-able parts *** --></b> <Component type="org.mc4j.console.swing.SectionHolder"> <Attribute name="title" value="(Literal)MBean Attributes"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.BorderLayout"/> <Content> <b><!-- *** This component displays the attributes of an MBean *** --></b> <Component type="org.mc4j.console.dashboard.components.AttributeTreeTableExplorer"> <b><!-- *** Notice were setting the node that we matched above by name here *** --></b> <Attribute name="beanNode" value="BeanNode"/> <Constraint type="BorderConstraints" direction="CENTER"/> <Border type="javax.swing.border.LineBorder" color="(Literal)0x444444" thickness="(Literal)1"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> </Component> </Content> </Component> <Component type="org.mc4j.console.swing.SectionHolder"> <Attribute name="title" value="(Literal)MBean Operations"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> <Content> <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> <Attribute name="beanNode" value="BeanNode"/> <Attribute name="format" value="(Literal)FULL_FORMAT"/> </Component> </Content> </Component> <Component type="org.mc4j.console.dashboard.components.FillerComponent"> <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> </Component> </Content> </Component> </Content> </Component> </Content> </Dashboard> </pre> </section> </body> </document> --- NEW FILE: module.xml --- <?xml version="1.0" encoding="ISO-8859-1"?> <module> <title>MC4J Management Console</title> <crumbs> <crumb name="Dashboard Guide" href="index.html"/> </crumbs> <relative-path>./..</relative-path> <path>/dashboard-dev/</path> <body> <menu name="Documents"> <item name="Dashboard XML" href="DashboardXML.html"/> <item name="Dashboard Components" href="DashboardComponents.html"/> </menu> </body> </module> |