mc4j-cvs Mailing List for MC4J JMX Console (Page 10)
Brought to you by:
ghinkl
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(7) |
Apr
(135) |
May
(32) |
Jun
(34) |
Jul
|
Aug
|
Sep
(7) |
Oct
(139) |
Nov
(11) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(34) |
Feb
(1) |
Mar
(12) |
Apr
|
May
(87) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(27) |
Nov
(49) |
Dec
(13) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
(252) |
May
(16) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(3) |
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(2) |
Jul
(15) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(6) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
From: Greg H. <gh...@us...> - 2006-04-12 17:29:21
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/bean Modified Files: Tag: ems_module_separation DashboardsAction.java MBeanNode.java OperationListAction.java UnregisterMBeanAction.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: OperationListAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/OperationListAction.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** OperationListAction.java 5 Oct 2004 05:15:57 -0000 1.3 --- OperationListAction.java 12 Apr 2006 17:28:36 -0000 1.3.2.1 *************** *** 18,28 **** import java.awt.event.ActionEvent; ! import java.util.ArrayList; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.Set; ! import java.util.TreeMap; import javax.swing.JMenuItem; --- 18,22 ---- import java.awt.event.ActionEvent; ! import java.util.*; import javax.swing.JMenuItem; *************** *** 40,43 **** --- 34,38 ---- import org.mc4j.console.bean.operation.OperationExecuteNodeAction; import org.mc4j.console.bean.operation.OperationNode; + import org.mc4j.ems.connection.bean.operation.EmsOperation; *************** *** 128,135 **** private static final class ActSubMenuModel implements Actions.SubMenuModel { ! private List displayNames = new ArrayList(); // List<String> ! private List associatedInfo = new ArrayList(); // List<Object> ! private Set listeners = new HashSet(); // Set<ChangeListener> private MBeanNode node; --- 123,129 ---- private static final class ActSubMenuModel implements Actions.SubMenuModel { ! private Set listeners = new HashSet(); ! private List<EmsOperation> operationList = new ArrayList<EmsOperation>(); private MBeanNode node; *************** *** 140,148 **** public int getCount() { ! return displayNames.size(); } public String getLabel(int index) { ! return (String)displayNames.get(index); } --- 134,142 ---- public int getCount() { ! return operationList.size(); } public String getLabel(int index) { ! return operationList.get(index).getName(); } *************** *** 152,161 **** public void performActionAt(int index) { ! OperationNode operationNode = (OperationNode) associatedInfo.get(index); OperationExecuteNodeAction action = (OperationExecuteNodeAction) NodeAction.get(OperationExecuteNodeAction.class); ! action.performAction(new Node[] { operationNode }); } --- 146,156 ---- public void performActionAt(int index) { ! EmsOperation operation = operationList.get(index); ! OperationExecuteNodeAction action = (OperationExecuteNodeAction) NodeAction.get(OperationExecuteNodeAction.class); ! action.performAction(operation); } *************** *** 178,199 **** void addNotify() { ! this.displayNames = new ArrayList(); ! this.associatedInfo = new ArrayList(); ! ! // Let's sort'em up in alphabetical order shall we. ! TreeMap sortedMap = new TreeMap(); ! for (Iterator iterator = this.node.getOperationNodeMap().entrySet().iterator(); iterator.hasNext();) { ! Map.Entry entry = (Map.Entry) iterator.next(); ! ! sortedMap.put(entry.getKey(),entry.getValue()); ! } ! ! for (Iterator iterator = sortedMap.entrySet().iterator(); iterator.hasNext();) { ! Map.Entry entry = (Map.Entry) iterator.next(); ! ! this.displayNames.add(entry.getKey()); ! this.associatedInfo.add(entry.getValue()); ! ! } } --- 173,177 ---- void addNotify() { ! this.operationList = new ArrayList<EmsOperation>(this.node.getEmsBean().getOperations()); } Index: DashboardsAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/DashboardsAction.java,v retrieving revision 1.16 retrieving revision 1.16.2.1 diff -C2 -d -r1.16 -r1.16.2.1 *** DashboardsAction.java 5 Oct 2004 05:15:57 -0000 1.16 --- DashboardsAction.java 12 Apr 2006 17:28:36 -0000 1.16.2.1 *************** *** 18,25 **** import org.mc4j.console.dashboard.Dashboard; - import org.mc4j.console.dashboard.DashboardFactory; import org.mc4j.console.dashboard.DashboardManager; import org.mc4j.console.dashboard.DashboardTopComponent; ! import org.openide.ErrorManager; import org.openide.awt.Actions; import org.openide.awt.JInlineMenu; --- 18,24 ---- import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.DashboardManager; import org.mc4j.console.dashboard.DashboardTopComponent; ! import org.mc4j.ems.connection.support.ConnectionListener; import org.openide.awt.Actions; import org.openide.awt.JInlineMenu; *************** *** 28,32 **** import org.openide.util.actions.SystemAction; import org.openide.windows.IOProvider; - import org.openide.windows.TopComponent; import javax.swing.*; --- 27,30 ---- *************** *** 38,42 **** import java.util.Iterator; import java.util.List; - import java.util.Map; import java.util.Set; --- 36,39 ---- *************** *** 76,80 **** } ! /** Perform extra initialization of this action's singleton. * PLEASE do not use constructors for this purpose! * protected void initialize() { --- 73,78 ---- } ! /** ! * Perform extra initialization of this action's singleton. * PLEASE do not use constructors for this purpose! * protected void initialize() { *************** *** 105,109 **** return new SpecialSubMenu(this, new ActSubMenuModel(this.node), true); } ! } catch(InterruptedException ie) { IOProvider.getDefault().getStdOut().println("Couldn't refresh node."); } --- 103,107 ---- return new SpecialSubMenu(this, new ActSubMenuModel(this.node), true); } ! } catch (InterruptedException ie) { IOProvider.getDefault().getStdOut().println("Couldn't refresh node."); } *************** *** 121,125 **** } ! /** Special submenu which notifies model when it is added as a component. */ private static final class SpecialSubMenu extends Actions.SubMenu { --- 119,124 ---- } ! /** ! * Special submenu which notifies model when it is added as a component. */ private static final class SpecialSubMenu extends Actions.SubMenu { *************** *** 142,146 **** } ! /** Model to use for the submenu. */ private static final class ActSubMenuModel implements Actions.SubMenuModel { --- 141,146 ---- } ! /** ! * Model to use for the submenu. */ private static final class ActSubMenuModel implements Actions.SubMenuModel { *************** *** 162,166 **** public String getLabel(int index) { ! return (String)displayNames.get(index); } --- 162,166 ---- public String getLabel(int index) { ! return (String) displayNames.get(index); } *************** *** 172,200 **** final Dashboard dashboard = (Dashboard) associatedInfo.get(index); - // do something with it - //org.openide.windows.IOProvider.getDefault().getStdOut().println("Action Performed, Info is: " + infoDoc.getDocumentElement()); - if (dashboard == null) { org.mc4j.console.dashboard.DashboardManager.getInstance().initialize(); } else { ! Map context = dashboard.getContextStarter(); ! context.put(Dashboard.CONTEXT_MBEAN_SERVER, this.node.getMBeanServer()); ! context.put(Dashboard.CONTEXT_OBJECT_NAME, this.node.getObjectName()); ! context.put(Dashboard.CONTEXT_MBEAN_NODE, this.node); ! DashboardFactory factory = new DashboardFactory(); ! try { ! JComponent component = factory.buildDashboard(dashboard, context); ! final TopComponent tc = new DashboardTopComponent(component, this.node.getObjectName().getCanonicalName()); ! SwingUtilities.invokeLater(new Runnable() { ! public void run() { ! tc.setDisplayName(dashboard.getDisplayName()); ! tc.open(); ! tc.requestActive(); ! } ! }); ! this.node.getConnectionNode().registerDashboard(tc); ! } catch (Exception e) { ! ErrorManager.getDefault().notify(e); ! } } } --- 172,196 ---- final Dashboard dashboard = (Dashboard) associatedInfo.get(index); if (dashboard == null) { org.mc4j.console.dashboard.DashboardManager.getInstance().initialize(); } else { ! final DashboardTopComponent tc = new DashboardTopComponent(dashboard, this.node.getEmsBean().getBeanName().getCanonicalName()); ! tc.launch(); ! ! // TODO: Need to figure out where we want to track open dashboards now... ! // probably against the EmsConnection ! this.node.getEmsBean().getConnectionProvider().addConnectionListener(new ConnectionListener() { ! public void connect() { ! } ! ! public void disconnect() { ! tc.close(); ! } ! ! public void connectionFailure() { ! // TODO: Some sort of glasspane level info? ! } ! }); ! this.node.getConnectionNode().registerDashboard(tc); } } *************** *** 208,212 **** } ! /** You may use this is you have attached other listeners to things that will affect displayNames, for example. */ private synchronized void fireStateChanged() { if (listeners.size() == 0) return; --- 204,210 ---- } ! /** ! * You may use this is you have attached other listeners to things that will affect displayNames, for example. ! */ private synchronized void fireStateChanged() { if (listeners.size() == 0) return; *************** *** 214,218 **** Iterator it = listeners.iterator(); while (it.hasNext()) ! ((ChangeListener)it.next()).stateChanged(ev); } --- 212,216 ---- Iterator it = listeners.iterator(); while (it.hasNext()) ! ((ChangeListener) it.next()).stateChanged(ev); } Index: UnregisterMBeanAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/UnregisterMBeanAction.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** UnregisterMBeanAction.java 5 Oct 2004 05:15:57 -0000 1.2 --- UnregisterMBeanAction.java 12 Apr 2006 17:28:36 -0000 1.2.2.1 *************** *** 46,53 **** JOptionPane.showConfirmDialog(null, "Are you sure you want to unregister " + ! node.getObjectName().getCanonicalName() + "?"); if (result == JOptionPane.YES_OPTION) { try { ! node.getMBeanServer().unregisterMBean(node.getObjectName()); } catch (Exception e) { ErrorManager.getDefault().notify(e); --- 46,53 ---- JOptionPane.showConfirmDialog(null, "Are you sure you want to unregister " + ! node.getEmsBean().getBeanName().getCanonicalName() + "?"); if (result == JOptionPane.YES_OPTION) { try { ! node.getEmsBean().unregister(); } catch (Exception e) { ErrorManager.getDefault().notify(e); Index: MBeanNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/MBeanNode.java,v retrieving revision 1.31 retrieving revision 1.31.2.1 diff -C2 -d -r1.31 -r1.31.2.1 *** MBeanNode.java 14 Mar 2005 16:06:55 -0000 1.31 --- MBeanNode.java 12 Apr 2006 17:28:36 -0000 1.31.2.1 *************** *** 18,66 **** import org.mc4j.console.Refreshable; ! import org.mc4j.console.bean.attribute.AttributeNameComparator; ! import org.mc4j.console.bean.attribute.AttributeNode; import org.mc4j.console.bean.attribute.AttributeSetNode; - import org.mc4j.console.bean.notification.NotificationNameComparator; - import org.mc4j.console.bean.notification.NotificationNode; import org.mc4j.console.bean.notification.NotificationSetNode; - import org.mc4j.console.bean.operation.OperationNameComparator; - import org.mc4j.console.bean.operation.OperationNode; [...965 lines suppressed...] + * @param notificationNodeMap New value of property notificationNodeMap. */ public void setNotificationNodeMap(Map notificationNodeMap) { *************** *** 814,820 **** return attributesNode; } ! public boolean isRegistered() { ! return getMBeanServer().isRegistered(this.objectName); } --- 676,682 ---- return attributesNode; } ! public boolean isRegistered() { ! return true; // TODO Implement //getMBeanServer().isRegistered(emsBean.getObjectName()); } |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:20
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/weblogic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/application/dashboards/weblogic Modified Files: Tag: ems_module_separation Weblogic_EJBPoolRuntimeTable.xml Weblogic_EJBTransactionRuntime.xml Weblogic_ExecuteQueue_Stats.xml Weblogic_ServletTable.xml Added Files: Tag: ems_module_separation Weblogic_Applications.xml Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: Weblogic_ServletTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/weblogic/Weblogic_ServletTable.xml,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Weblogic_ServletTable.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Weblogic_ServletTable.xml 12 Apr 2006 17:28:34 -0000 1.3.2.1 *************** *** 1,6 **** <?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="Servlet Statistics"> <Description>This dashboard shows the statistics of Weblogic Servlets.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Servlet Statistics"> <Description>This dashboard shows the statistics of Weblogic Servlets.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Weblogic/Web"> <BeanMatch id="ServletRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="Type=ServletRuntime"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Weblogic/Web"> <BeanMatch id="ServletRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="Type=ServletRuntime"/> </BeanMatch> </DashboardMatch> *************** *** 15,52 **** <Content> ! <!-- *** The header section displays title and a refresh control *** --> ! <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> ! ! ! <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> <Attribute name="beanList" value="ServletRuntimeList"/> <Constraint type="BorderConstraints" direction="CENTER"/> --- 15,19 ---- <Content> ! <Component type="org.mc4j.console.dashboard.components.AttributeTablePopupComponent"> <Attribute name="beanList" value="ServletRuntimeList"/> <Constraint type="BorderConstraints" direction="CENTER"/> Index: Weblogic_EJBTransactionRuntime.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/weblogic/Weblogic_EJBTransactionRuntime.xml,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Weblogic_EJBTransactionRuntime.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Weblogic_EJBTransactionRuntime.xml 12 Apr 2006 17:28:34 -0000 1.3.2.1 *************** *** 1,6 **** <?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="EJB Transaction Statistics"> <Description>EJB transaction statistics.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="EJB Transaction Statistics"> <Description>EJB transaction statistics.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Weblogic/EJB"> <BeanMatch id="EJBTransactionRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="Type=EJBTransactionRuntime"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Weblogic/EJB"> <BeanMatch id="EJBTransactionRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="Type=EJBTransactionRuntime"/> </BeanMatch> </DashboardMatch> *************** *** 15,49 **** <Content> ! <!-- *** The header section displays title and a refresh control *** --> ! <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> --- 15,19 ---- <Content> ! Index: Weblogic_EJBPoolRuntimeTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/weblogic/Weblogic_EJBPoolRuntimeTable.xml,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Weblogic_EJBPoolRuntimeTable.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Weblogic_EJBPoolRuntimeTable.xml 12 Apr 2006 17:28:34 -0000 1.3.2.1 *************** *** 1,6 **** <?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="EJB Pool Runtime Statistics"> <Description>EJB pool object runtime statistics.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="EJB Pool Runtime Statistics"> <Description>EJB pool object runtime statistics.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Weblogic/EJB"> <BeanMatch id="EJBPoolRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="Type=EJBPoolRuntime"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Weblogic/EJB"> <BeanMatch id="EJBPoolRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="Type=EJBPoolRuntime"/> </BeanMatch> </DashboardMatch> *************** *** 15,49 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <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> --- 15,18 ---- --- NEW FILE: Weblogic_Applications.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <Dashboard version="2.0" name="Applications"> <Description>Shows installed applications.</Description> <DashboardMatch type="Global" location="/Weblogic/"> <BeanMatch id="ApplicationList" type="Multiple"> <Condition type="BeanObjectNameRegexCondition" filter="Type=Application"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.AttributeTablePopupComponent"> <Attribute name="beanList" value="ApplicationList"/> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="preferredSize" value="100,100"/> <Attribute name="AttributeName" value="(Literal)Name"/> <Attribute name="AttributeName" value="(Literal)FullPath"/> <Attribute name="AttributeName" value="(Literal)deploy"/> <Attribute name="AttributeName" value="(Literal)undeploy"/> </Component> </Content> </Dashboard> Index: Weblogic_ExecuteQueue_Stats.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/weblogic/Weblogic_ExecuteQueue_Stats.xml,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Weblogic_ExecuteQueue_Stats.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Weblogic_ExecuteQueue_Stats.xml 12 Apr 2006 17:28:34 -0000 1.3.2.1 *************** *** 1,6 **** <?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="Execute Queue Statistics"> <Description>This dashboard shows the statistics of a WebLogic Execute Queue.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Execute Queue Statistics" standardHeader="true" refreshControl="true"> <Description>This dashboard shows the statistics of a WebLogic Execute Queue.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Weblogic/Web"> <BeanMatch id="ExecuteQueueRuntimeBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="Type=ExecuteQueueRuntime"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Weblogic/Web"> <BeanMatch id="ExecuteQueueRuntimeBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="Type=ExecuteQueueRuntime"/> </BeanMatch> </DashboardMatch> *************** *** 15,47 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> ! ! <!-- *** The header section displays title and a refresh control *** --> ! <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> ! </Content> ! </Component> ! <!-- *** Scroll pane of info *** --> --- 15,19 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! <!-- *** Scroll pane of info *** --> |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:20
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/bean/attribute Modified Files: Tag: ems_module_separation AttributeNode.java AttributePropertyFactory.java AttributeSetChildren.java AttributeSetNode.java BrowseToAction.java GraphAttributesAction.java Added Files: Tag: ems_module_separation AttributeChildNode.java AttributeChildren.java Removed Files: Tag: ems_module_separation AttributeGraphPanel.java AttributeNameComparator.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: AttributeSetChildren.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeSetChildren.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** AttributeSetChildren.java 5 Oct 2004 05:15:56 -0000 1.7 --- AttributeSetChildren.java 12 Apr 2006 17:28:36 -0000 1.7.2.1 *************** *** 17,23 **** package org.mc4j.console.bean.attribute; import org.openide.nodes.Children; ! import org.mc4j.console.bean.MBeanNode; /** --- 17,26 ---- package org.mc4j.console.bean.attribute; + import org.mc4j.ems.connection.bean.EmsBean; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Children; + import org.openide.nodes.Node; ! import java.util.SortedSet; /** *************** *** 29,36 **** public class AttributeSetChildren extends Children.SortedArray { ! protected MBeanNode mbeanNode; ! public AttributeSetChildren(MBeanNode mbeanNode) { ! this.mbeanNode = mbeanNode; } --- 32,39 ---- public class AttributeSetChildren extends Children.SortedArray { ! protected EmsBean emsBean; ! public AttributeSetChildren(EmsBean emsBean) { ! this.emsBean = emsBean; } *************** *** 38,51 **** super.addNotify(); - Thread thread = - new Thread( - new Runnable() { - public void run() { - mbeanNode.refresh(); - } - }, - "mc4j AttributeSetChildren Loader"); ! thread.start(); } } --- 41,54 ---- super.addNotify(); ! SortedSet<EmsAttribute> attributes = emsBean.getAttributes(); ! Node[] newNodes = new Node[attributes.size()]; ! int i = 0; ! for (EmsAttribute attribute : attributes) { ! ! AttributeNode node = new AttributeNode(attribute); ! newNodes[i++] = node; ! } ! add(newNodes); } } Index: AttributePropertyFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributePropertyFactory.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** AttributePropertyFactory.java 5 Oct 2004 05:15:56 -0000 1.8 --- AttributePropertyFactory.java 12 Apr 2006 17:28:36 -0000 1.8.2.1 *************** *** 20,29 **** import org.mc4j.console.swing.editor.ArrayEditor; import org.mc4j.console.swing.editor.jmx.CompositeDataEditor; - import org.mc4j.console.swing.editor.jmx.ObjectNameEditor; import org.mc4j.console.swing.editor.jmx.TabularDataEditor; import org.openide.nodes.Node; - import javax.management.MBeanAttributeInfo; - import javax.management.ObjectName; import java.beans.PropertyEditorManager; import java.lang.reflect.InvocationTargetException; --- 20,27 ---- import org.mc4j.console.swing.editor.ArrayEditor; import org.mc4j.console.swing.editor.jmx.CompositeDataEditor; import org.mc4j.console.swing.editor.jmx.TabularDataEditor; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Node; import java.beans.PropertyEditorManager; import java.lang.reflect.InvocationTargetException; *************** *** 38,42 **** private AttributePropertyFactory() { ! PropertyEditorManager.registerEditor(ObjectName.class, ObjectNameEditor.class); try { --- 36,40 ---- private AttributePropertyFactory() { ! // PropertyEditorManager.registerEditor(ObjectName.class, ObjectNameEditor.class); try { *************** *** 61,82 **** } ! public Node.Property buildProperty(AttributeNode node) { ! ! MBeanAttributeInfo attributeInfo = node.getAttributeInfo(); Node.Property property = null; ! if (node.isCanDisplay()) { ! ! try { ! Class type = MBeanNode.findType(attributeInfo.getType()); ! property = new AttributeProperty(type, node); ! } catch (ClassNotFoundException cnfe) { ! //ErrorManager.getDefault().notify(cnfe); ! property = new AttributeProperty(node); ! } ! } else { ! property = new AttributeProperty(node); } --- 59,73 ---- } ! public Node.Property buildProperty(EmsAttribute emsAttribute) { Node.Property property = null; ! try { ! Class type = MBeanNode.findType(emsAttribute.getType()); ! property = new AttributeProperty(type, emsAttribute); ! } catch (ClassNotFoundException cnfe) { ! //ErrorManager.getDefault().notify(cnfe); ! property = new AttributeProperty(emsAttribute); } *************** *** 87,106 **** public static class AttributeProperty extends Node.Property { ! protected AttributeNode attributeNode; protected boolean unknownType = false; ! public AttributeProperty(Class type, AttributeNode attributeNode) { super(type); ! this.attributeNode = attributeNode; ! setName(this.attributeNode.getDisplayName()); ! setShortDescription(attributeNode.getAttributeInfo().getDescription() + ! " (" + attributeNode.getAttributeInfo().getType() + ")"); } ! public AttributeProperty(AttributeNode attributeNode) { ! this(String.class, attributeNode); unknownType = true; } --- 78,97 ---- public static class AttributeProperty extends Node.Property { ! protected EmsAttribute emsAttribute; protected boolean unknownType = false; ! public AttributeProperty(Class type, EmsAttribute emsAttribute) { super(type); ! this.emsAttribute = emsAttribute; ! setName(this.emsAttribute.getName()); ! setShortDescription(this.emsAttribute.getDescription() + ! " (" + this.emsAttribute.getType() + ")"); } ! public AttributeProperty(EmsAttribute emsAttribute) { ! this(String.class, emsAttribute); unknownType = true; } *************** *** 112,116 **** */ public boolean canRead() { ! return this.attributeNode.getAttributeInfo().isReadable(); } --- 103,107 ---- */ public boolean canRead() { ! return this.emsAttribute.isReadable(); } *************** *** 124,136 **** return false; ! return this.attributeNode.getAttributeInfo().isWritable(); } public Object getValue() throws IllegalAccessException, InvocationTargetException { ! if (this.attributeNode.isCanDisplay()) { ! return this.attributeNode.getValue(); ! } else { ! return "<cannot display>"; ! } } --- 115,123 ---- return false; ! return this.emsAttribute.isWritable(); } public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return this.emsAttribute.getValue(); } *************** *** 139,143 **** try { ! this.attributeNode.setValue(val); } catch(Exception e) { throw new InvocationTargetException(e); --- 126,130 ---- try { ! this.emsAttribute.setValue(val); } catch(Exception e) { throw new InvocationTargetException(e); Index: GraphAttributesAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/GraphAttributesAction.java,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** GraphAttributesAction.java 5 Oct 2004 05:15:56 -0000 1.6 --- GraphAttributesAction.java 12 Apr 2006 17:28:36 -0000 1.6.2.1 *************** *** 17,40 **** package org.mc4j.console.bean.attribute; ! import java.awt.Color; ! import java.math.BigDecimal; ! import java.math.BigInteger; ! import java.util.HashSet; ! import java.util.Set; ! ! import javax.management.MBeanAttributeInfo; ! import javax.management.ObjectName; ! import javax.swing.SwingUtilities; ! import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; ! import org.mc4j.console.bean.MBeanNode; /** ! * Action sensitive to the node selection that does something useful. ! * Consider using a cookie action instead if you can define what the ! * action is applicable to in terms of cookies. * * @author Greg Hinkle (gh...@us...), January 2002 --- 17,38 ---- package org.mc4j.console.bean.attribute; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.swing.graph.AttributeGraphPanel; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; ! import javax.swing.*; ! import java.awt.*; ! import java.math.BigDecimal; ! import java.math.BigInteger; ! import java.util.ArrayList; ! import java.util.HashSet; ! import java.util.List; ! import java.util.Set; /** ! * * * @author Greg Hinkle (gh...@us...), January 2002 *************** *** 44,67 **** protected void performAction(Node[] nodes) { ! // do work based on the current node selection, e.g.: ! AttributeNode node = (AttributeNode)nodes[0]; ! // ... ! // Note that casting to a type of node is often not the right ! // solution; try using a CookieAction, unless it is really the ! // node itself and not the underlying data that needs to be ! // considered. Also remember that some tests on nodes (casts ! // as well as reorderability of children etc.) will not work ! // when applied to filter nodes, whereas cookies will. ! ! MBeanAttributeInfo[] infos = new MBeanAttributeInfo[nodes.length]; ! ! for (int i = 0; i < nodes.length; i++) { ! infos[i] = ((AttributeNode)nodes[i]).getAttributeInfo(); } ! ObjectName objectName = ((MBeanNode)nodes[0].getParentNode().getParentNode()).getObjectName(); ! ! final AttributeGraphPanel graphPanel = new AttributeGraphPanel( ! objectName, infos,((AttributeNode)nodes[0]).getServer()); graphPanel.setBackground(Color.WHITE); --- 42,51 ---- protected void performAction(Node[] nodes) { ! List<EmsAttribute> attributes = new ArrayList<EmsAttribute>(); ! for (Node node : nodes) { ! attributes.add(((AttributeNode)node).getEmsAttribute()); } ! final AttributeGraphPanel graphPanel = new AttributeGraphPanel(attributes); graphPanel.setBackground(Color.WHITE); *************** *** 82,86 **** } AttributeNode node = (AttributeNode) nodes[i]; ! String typeName = node.getAttributeInfo().getType(); Class type = null; try { --- 66,70 ---- } AttributeNode node = (AttributeNode) nodes[i]; ! String typeName = node.getEmsAttribute().getType(); Class type = null; try { *************** *** 124,138 **** public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; - // If you will provide context help then use: - // return new HelpCtx(GraphAttributesAction.class); } - /** Perform extra initialization of this action's singleton. - * PLEASE do not use constructors for this purpose! - * protected void initialize() { - * super.initialize(); - * putProperty(Action.SHORT_DESCRIPTION, NbBundle.getMessage(GraphAttributesAction.class, "HINT_Action")); - * } - */ - } --- 108,112 ---- --- AttributeNameComparator.java DELETED --- --- AttributeGraphPanel.java DELETED --- --- NEW FILE: AttributeChildren.java --- /* * Copyright 2002-2004 Greg Hinkle * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mc4j.console.bean.attribute; import org.openide.nodes.Children; import org.mc4j.console.bean.MBeanNode; /** * Children set for attributes on an MBeanNode. * * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision: 1.1.2.1 $($Author: ghinkl $ / $Date: 2006/04/12 17:28:36 $) */ public class AttributeChildren extends Children.SortedArray { protected MBeanNode mbeanNode; public AttributeChildren(MBeanNode mbeanNode) { this.mbeanNode = mbeanNode; } protected void addNotify() { super.addNotify(); // TODO GH: Implement child collection entry loading // Thread thread = // new Thread( // new Runnable() { // public void run() { // mbeanNode.refresh(); // } // }, // "mc4j AttributeSetChildren Loader"); // // thread.start(); } } Index: BrowseToAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/BrowseToAction.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** BrowseToAction.java 5 Oct 2004 05:15:56 -0000 1.3 --- BrowseToAction.java 12 Apr 2006 17:28:36 -0000 1.3.2.1 *************** *** 17,22 **** package org.mc4j.console.bean.attribute; - import javax.management.MBeanAttributeInfo; - import javax.management.ObjectName; import org.openide.nodes.Node; --- 17,20 ---- *************** *** 27,30 **** --- 25,30 ---- import org.mc4j.console.connection.ConnectionNode; + import javax.management.ObjectName; + /** * This action will browse the explorer tree to a managed object for a attribute *************** *** 39,50 **** AttributeNode node = (AttributeNode)nodes[0]; - MBeanAttributeInfo[] infos = new MBeanAttributeInfo[nodes.length]; - - for (int i = 0; i < nodes.length; i++) { - infos[i] = ((AttributeNode)nodes[i]).getAttributeInfo(); - } - ObjectName objectName = (ObjectName) node.getValue(); ! if (objectName != null) { Node curNode = node; while (! (curNode instanceof ConnectionNode)) { --- 39,44 ---- AttributeNode node = (AttributeNode)nodes[0]; ObjectName objectName = (ObjectName) node.getValue(); ! if (objectName != null) { Node curNode = node; while (! (curNode instanceof ConnectionNode)) { *************** *** 53,57 **** ConnectionNode connectionNode = (ConnectionNode) curNode; ! connectionNode.browseToMBean(objectName); } } --- 47,52 ---- ConnectionNode connectionNode = (ConnectionNode) curNode; ! // TODO! ! // connectionNode.browseToMBean(objectName); } } *************** *** 65,69 **** AttributeNode node = (AttributeNode) nodes[0]; ! String typeName = node.getAttributeInfo().getType(); Class type = null; try { --- 60,64 ---- AttributeNode node = (AttributeNode) nodes[0]; ! String typeName = node.getEmsAttribute().getType(); Class type = null; try { --- NEW FILE: AttributeChildNode.java --- /* * Copyright 2002-2004 Greg Hinkle * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mc4j.console.bean.attribute; /** * @author Greg Hinkle (gh...@us...), Jan 6, 2005 * @version $Revision: 1.1.2.1 $($Author: ghinkl $ / $Date: 2006/04/12 17:28:36 $) */ public class AttributeChildNode { public void refresh() { // do nothing } } Index: AttributeNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeNode.java,v retrieving revision 1.16 retrieving revision 1.16.2.1 diff -C2 -d -r1.16 -r1.16.2.1 *** AttributeNode.java 7 Jan 2005 05:10:53 -0000 1.16 --- AttributeNode.java 12 Apr 2006 17:28:36 -0000 1.16.2.1 *************** *** 19,37 **** import org.mc4j.console.Refreshable; import org.mc4j.console.bean.attribute.watch.CreateMonitorAction; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.AbstractNode; ! import org.openide.nodes.Children; ! import org.openide.nodes.Node; ! import org.openide.nodes.PropertySupport; ! import org.openide.nodes.Sheet; import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; - import javax.management.Attribute; - import javax.management.MBeanAttributeInfo; - import javax.management.MBeanServer; - import javax.management.ObjectInstance; - import javax.management.ObjectName; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; --- 19,29 ---- import org.mc4j.console.Refreshable; import org.mc4j.console.bean.attribute.watch.CreateMonitorAction; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.*; import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; *************** *** 45,52 **** public class AttributeNode extends AbstractNode implements Refreshable, Comparable { ! protected MBeanServer server; ! protected ObjectInstance objectInstance; ! protected ObjectName objectName; ! protected MBeanAttributeInfo attributeInfo; protected Node.Property valuePropertyNode; --- 37,41 ---- public class AttributeNode extends AbstractNode implements Refreshable, Comparable { ! protected EmsAttribute emsAttribute; protected Node.Property valuePropertyNode; *************** *** 60,103 **** // TODO GH: Create sub-nodes for array and collection values ! /** ! * @deprecated ! * @param server ! * @param objectInstance ! * @param attributeInfo ! */ ! public AttributeNode( ! MBeanServer server, ! ObjectInstance objectInstance, ! MBeanAttributeInfo attributeInfo) { ! this(server, objectInstance.getObjectName(), attributeInfo); ! } ! ! public AttributeNode(Children children) { ! super(children); ! } ! ! public AttributeNode( ! MBeanServer server, ! ObjectName objectName, ! MBeanAttributeInfo attributeInfo) { ! super(Children.LEAF); ! this.server = server; ! this.attributeInfo = attributeInfo; ! this.objectName = objectName; ! setIconBase("org/mc4j/console/bean/attribute/AttributeNodeIcon"); ! setName(this.attributeInfo.getName()); // or, super.setName if needed refresh(); ! setDisplayName(this.attributeInfo.getName()); ! setShortDescription(this.attributeInfo.getDescription()); } public boolean isCanDisplay() { return canDisplay; --- 49,72 ---- // TODO GH: Create sub-nodes for array and collection values ! public AttributeNode(EmsAttribute emsAttribute) { super(Children.LEAF); ! this.emsAttribute = emsAttribute; setIconBase("org/mc4j/console/bean/attribute/AttributeNodeIcon"); ! setName(this.emsAttribute.getName()); // or, super.setName if needed refresh(); ! setDisplayName(this.emsAttribute.getName()); ! setShortDescription(this.emsAttribute.getDescription()); } + public EmsAttribute getEmsAttribute() { + return emsAttribute; + } + public boolean isCanDisplay() { return canDisplay; *************** *** 120,125 **** try { ! server.setAttribute(objectName, ! new Attribute(attributeInfo.getName(), newValue)); } catch (Exception e) { throw new InvocationTargetException(e); --- 89,93 ---- try { ! emsAttribute.setValue(newValue); } catch (Exception e) { throw new InvocationTargetException(e); *************** *** 138,142 **** Object newValue = null; try { ! newValue = server.getAttribute(this.objectName, this.attributeInfo.getName()); } catch (Exception e) { e.printStackTrace(); --- 106,111 ---- Object newValue = null; try { ! this.emsAttribute.refresh(); ! newValue = this.emsAttribute.getValue(); } catch (Exception e) { e.printStackTrace(); *************** *** 182,196 **** } - /** Getter for property attributeInfo. - * @return Value of property attributeInfo. - * - */ - public javax.management.MBeanAttributeInfo getAttributeInfo() { - return attributeInfo; - } - - public MBeanServer getServer() { - return this.server; - } public int compareTo(Object o) { --- 151,154 ---- *************** *** 225,229 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return attributeInfo.getName(); } }); --- 183,187 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return AttributeNode.this.emsAttribute.getName(); } }); *************** *** 234,238 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return attributeInfo.getDescription(); } }); --- 192,196 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return AttributeNode.this.emsAttribute.getDescription(); } }); *************** *** 243,247 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return attributeInfo.getType(); } }); --- 201,205 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return AttributeNode.this.emsAttribute.getType(); } }); *************** *** 252,256 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return new Boolean(attributeInfo.isWritable()); } }); --- 210,214 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return new Boolean(AttributeNode.this.emsAttribute.isWritable()); } }); *************** *** 313,317 **** * * @since MC4J 1.2b5 - * @return */ public synchronized Node.Property getValueProperty() { --- 271,274 ---- *************** *** 323,327 **** private Node.Property buildAttributeValueProperty() { ! return AttributePropertyFactory.getInstance().buildProperty(this); } --- 280,284 ---- private Node.Property buildAttributeValueProperty() { ! return AttributePropertyFactory.getInstance().buildProperty(this.emsAttribute); } *************** *** 381,389 **** } - - public ObjectName getObjectName() { - return objectName; - } - - } --- 338,340 ---- Index: AttributeSetNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeSetNode.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** AttributeSetNode.java 5 Oct 2004 05:15:56 -0000 1.11 --- AttributeSetNode.java 12 Apr 2006 17:28:36 -0000 1.11.2.1 *************** *** 17,41 **** package org.mc4j.console.bean.attribute; import org.openide.nodes.AbstractNode; - import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; - import org.mc4j.console.Refreshable; - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.RefreshAction; - import org.mc4j.console.install.ExplorerUtil; - - import java.util.ArrayList; - import java.util.HashMap; - import java.util.Iterator; - import java.util.List; - import java.util.Map; - - import javax.management.Attribute; - import javax.management.AttributeList; - import javax.management.MBeanAttributeInfo; - /** * The MBeanNode child that holds the attributes. --- 17,29 ---- package org.mc4j.console.bean.attribute; + import org.mc4j.console.Refreshable; + import org.mc4j.console.bean.RefreshAction; + import org.mc4j.console.install.ExplorerUtil; + import org.mc4j.ems.connection.bean.EmsBean; import org.openide.nodes.AbstractNode; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; /** * The MBeanNode child that holds the attributes. *************** *** 48,60 **** public static final String NAME = "Attributes"; - private MBeanNode mbeanNode; private boolean hasUnsupportedType = false; ! private Map unsupportedAttributeMap = new HashMap(); ! public AttributeSetNode(MBeanNode mbeanNode) { ! super(new AttributeSetChildren(mbeanNode)); ! this.mbeanNode = mbeanNode; setIconBase("org/mc4j/console/bean/attribute/AttributeSetNodeIcon"); --- 36,47 ---- public static final String NAME = "Attributes"; private boolean hasUnsupportedType = false; ! private EmsBean emsBean; ! public AttributeSetNode(EmsBean emsBean) { ! super(new AttributeSetChildren(emsBean)); ! this.emsBean = emsBean; setIconBase("org/mc4j/console/bean/attribute/AttributeSetNodeIcon"); *************** *** 67,71 **** } ! public void refresh() { if (ExplorerUtil.isExpanded(this)) { --- 54,61 ---- } ! ! ! ! public void refresh() { if (ExplorerUtil.isExpanded(this)) { *************** *** 75,150 **** public void retrieveData() { ! Node[] children = getChildren().getNodes(); ! ! if (!hasUnsupportedType) { ! MBeanAttributeInfo[] infos = ! this.mbeanNode.getMBeanInfo().getAttributes(); ! ! // MUST be careful to only ask for types that we know we have ! // otherwise the RMI call will fail and we will get no data. ! List nameList = new ArrayList(); ! for (int i = 0; i < infos.length; i++) { ! try { ! MBeanNode.findType(infos[i].getType()); ! // If we know the type, add it to the list ! nameList.add(infos[i].getName()); ! } catch (ClassNotFoundException cnfe) { } ! } ! ! String[] names = ! (String[]) ! nameList.toArray(new String[nameList.size()]); ! ! try { ! AttributeList attributeList = ! this.mbeanNode.getMBeanServer().getAttributes( ! this.mbeanNode.getObjectName(), ! names); ! if (attributeList.size() == names.length) { ! Map values = new HashMap(); ! Iterator iter = attributeList.iterator(); ! while (iter.hasNext()) { ! Attribute attr = (Attribute)iter.next(); ! values.put(attr.getName(),attr.getValue()); ! } ! for (int i = 0; i < children.length; i++) { ! AttributeNode node = (AttributeNode)children[i]; ! Object value = values.get(node.getName()); ! if (value != null) { ! node.updateValue(value); ! } else { ! if (values.containsKey(node.getName())) { ! node.updateValue(null); ! } else { ! node.setCanDisplay(false); ! node.setShortDescription("Value could not be displayed"); ! } ! } ! } ! } else { ! // If we still we're unable to load all the attributes at once ! // lets load as many as we can, one at a time. ! for (int i = 0; i < children.length; i++ ) { ! ((Refreshable)children[i]).refresh(); ! } ! } ! } catch (Exception e) { ! // Don't load them as a set anymore... ! this.hasUnsupportedType = true; ! //System.out.println(ExceptionUtility.printStackTracesToString(e)); ! ! // If we still we're unable to load all the attributes at once ! // lets load as many as we can, one at a time. ! for (int i = 0; i < children.length; i++ ) { ! ((Refreshable)children[i]).refresh(); ! } ! ! } ! } else { ! // lets load as many as we can, one at a time. ! for (int i = 0; i < children.length; i++ ) { ! ((Refreshable)children[i]).refresh(); ! } ! } } --- 65,69 ---- public void retrieveData() { ! emsBean.refreshAttributes(); } |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:20
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/jboss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/application/dashboards/jboss Modified Files: Tag: ems_module_separation JBoss_MQ_QueueTable.xml JBoss_MQ_TopicTable.xml JBoss_ServerInfoMBean.xml JBoss_ServerInfo_Memory.xml JBoss_System_Server_Control.xml JBoss_WebTable.xml JBoss_Web_Jetty.xml JBoss_Web_JettyNew.xml Added Files: Tag: ems_module_separation JBoss_Deployments.xml Removed Files: Tag: ems_module_separation JBoss_ServerDashboard.html JBoss_ServerDashboard.xml Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: JBoss_Web_JettyNew.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_Web_JettyNew.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** JBoss_Web_JettyNew.xml 16 Apr 2004 15:49:47 -0000 1.4 --- JBoss_Web_JettyNew.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,7 **** <?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="JBoss Jetty Statistics"> <Description>This dashboard shows the statistics of a Jetty servlet context.</Description> --- 1,7 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="JBoss Jetty Statistics"> <Description>This dashboard shows the statistics of a Jetty servlet context.</Description> *************** *** 9,13 **** <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="^jboss.jetty:Server=0$"/> </BeanMatch> </DashboardMatch> --- 9,13 ---- <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.jetty:Server=0$"/> </BeanMatch> </DashboardMatch> Index: JBoss_ServerInfoMBean.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_ServerInfoMBean.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** JBoss_ServerInfoMBean.xml 16 Apr 2004 15:49:47 -0000 1.5 --- JBoss_ServerInfoMBean.xml 12 Apr 2006 17:28:34 -0000 1.5.2.1 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 7,149 **** --> ! <Dashboard version="1.0" name="JBoss Server Info"> ! <Description>This dashboard displays basic information relating to the ! overall execution of a JBoss server.</Description> ! <DashboardMatch type="Global" location="/JBoss"> ! <BeanMatch id="JBossServerInfoBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="jboss.system:type=ServerInfo"/> ! </BeanMatch> ! </DashboardMatch> - - <LayoutManager type="java.awt.BorderLayout"/> - <Content> - - <!-- *** The header section displays title and a refresh control *** --> - <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)1000"/> - </Component> - </Content> - </Component> - - <Component type="javax.swing.JSplitPane"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <Attribute name="orientation" value="(Literal)HORIZONTAL_SPLIT"/> - <Attribute name="preferredSize" value="(Literal)400,300"/> - <Attribute name="minimumSize" value="(Literal)400,300"/> - <Attribute name="leftComponent"> - - <Component type="javax.swing.JScrollPane"> - <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="1" weightx="1" weighty="1" fill="BOTH"/> - <Content> - <Component type="org.mc4j.console.dashboard.components.AttributeListComponent"> - <Attribute name="beanNode" value="JBossServerInfoBean"/> - <!--Attribute name="MBeanNode" value="MBeanNode"/--> - <!--Attribute name="AttributeName" value="(Literal)BuildDate"/--> - <Attribute name="Label" value="(Literal)Server Information"/> - <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Border type="javax.swing.border.TitledBorder"> ! <Attribute name="title" value="(Literal)MBean Attributes"/> ! </Border> ! </Component> ! </Content> ! </Component> ! </Attribute> ! <Attribute name="rightComponent"> ! <Component type="javax.swing.JPanel"> ! ! <LayoutManager type="java.awt.GridBagLayout"/> ! ! <Content> ! <Component type="javax.swing.JPanel"> ! <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="1" weightx="0.5" weighty="0.5" fill="BOTH"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Attribute name="preferredSize" value="(Literal)150,150"/> ! <Attribute name="maxAttributeName" value="(Literal)MaxMemory"/> ! <Attribute name="currentAttributeName" value="(Literal)FreeMemory"/> ! <Attribute name="minimumSize" value="(Literal)50,50"/> ! <Attribute name="label" value="(Literal)Free Memory"/> ! <Attribute name="updateInterval" value="(Literal)1000"/> ! ! </Component> ! </Content> ! </Component> ! <Component type="javax.swing.JPanel"> ! <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="2" gridy="1" weightx="0.5" weighty="0.5" fill="BOTH"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Attribute name="preferredSize" value="(Literal)150,150"/> ! <Attribute name="maxAttributeValue" value="(Literal)500"/> ! <Attribute name="currentAttributeName" value="(Literal)ActiveThreadCount"/> ! <Attribute name="minimumSize" value="(Literal)50,50"/> ! <Attribute name="label" value="(Literal)Active Threads"/> ! </Component> ! </Content> ! </Component> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2" widthx="2" weightx="0.5" weighty="0.5" fill="BOTH" insets="3,3,3,3"/> ! <Attribute name="preferredSize" value="(Literal)100,100"/> ! <Attribute name="attributeName" value="(Literal)FreeMemory"/> ! </Component> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="2" gridy="2" widthx="2" weightx="0.5" weighty="0.5" fill="BOTH" insets="3,3,3,3"/> ! <Attribute name="attributeName" value="(Literal)ActiveThreadCount"/> ! ! </Component> ! ! ! ! </Content> ! </Component> ! ! </Attribute> ! ! </Component> ! ! <!-- List of methods to execute --> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Constraint type="BorderConstraints" direction="SOUTH"/> ! <Attribute name="format" value="(Literal)BUTTON_ONLY_FORMAT"/> ! ! <Border type="javax.swing.border.TitledBorder"> ! <Attribute name="title" value="(Literal)Server Actions"/> ! </Border> ! </Component> ! ! </Content> </Dashboard> --- 7,177 ---- --> ! <Dashboard version="2.0" name="JBoss Server Info" autoRefresh="true" refreshControl="true" standardHeader="true"> ! <Description>JBoss Application Server product details and general statistics.></Description> ! <DashboardMatch type="Global" location="/JBoss"> ! <BeanMatch id="serverInfo" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="jboss.system:type=ServerInfo"/> ! </BeanMatch> ! <BeanMatch id="server" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.system:type=Server$"/> ! </BeanMatch> ! <BeanMatch id="config" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.system:type=ServerConfig$"/> ! </BeanMatch> ! </DashboardMatch> ! <LayoutManager type="java.awt.BorderLayout"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> ! ! <Attribute name="html"> ! <![CDATA[ ! <img src="classpath://images/logos/jboss_logo.png"> ! ! <table cellpadding="6"> ! <tr> ! <td colspan="4"><font size="+2"><u>JBoss Version</u></font></td> ! </tr> ! <tr> ! <td align="right"><b>Version Name: </b></td> <td>${#server.VersionName}</td> ! <td align="right"><b>Built on: </b></td> <td>${#server.BuildDate}</td> ! </tr> ! ! <tr> ! <td align="right"><b>Version: </b></td> <td colspan="3"> ${#server.Version}</td> ! </tr> ! <tr> ! <td colspan="4"> ! <font size="+2"><u>Installation Environment</u></font> ! </td> ! </tr> ! ! <tr> ! <td align="right"><b>Base Location (local): </b></td> <td colspan="2">${#config.ServerBaseDir}</td> ! </tr> ! <tr> ! <td align="right"><b>Base Location: </b></td> <td colspan="2">${#config.ServerBaseUrl}</td> ! </tr> ! ! <tr> ! <td align="right"><b>Host: </b></td> <td>${#serverInfo.HostName} (${#serverInfo.HostAddress})</td> ! <td align="right"><b>Start date: </b></td> <td>${#server.StartDate}</td> ! </tr> ! ! <tr> ! <td align="right"><b>Running config: </b></td> <td>'${#config.ServerName}'</td> ! </tr> ! ! <tr> ! <td colspan="4"> ! <font size="+2"><u>Hardware</u></font> ! </td> ! <tr> ! ! <tr> ! <td align="right"><b>CPUs: </b></td> <td>${#serverInfo.AvailableProcessors}</td> ! <td align="right"><b>OS: </b></td> <td>${#serverInfo.OSName} ${#serverInfo.OSVersion} (${#serverInfo.OSArch})</td> ! </tr> ! ! <tr> ! <td colspan="4"> ! <font size="+2"><u>JVM Environment</u></font> ! </td> ! </tr> ! ! <tr> ! <td align="right"><b>Free Memory: </b></td> <td>${#serverInfo.FreeMemory / 1024 / 1024} MB</td> ! <td align="right"><b>Max Memory: </b></td> <td>${#serverInfo.MaxMemory / 1024 / 1024} MB</td> ! </tr> ! <tr> ! <td align="right"><b>Total Memory: </b></td> <td>${#serverInfo.TotalMemory / 1024 / 1024} MB</td> ! <td align="right"><b>#Threads: </b></td> <td>${#serverInfo.ActiveThreadCount}</td> ! </tr> ! ! <tr> ! <td align="right"><b>JVM Version: </b></td> <td>${#serverInfo.JavaVMVersion} ("${#serverInfo.JavaVMVendor}")</td> ! <td align="right"><b>JVM Name: </b></td> <td>${#serverInfo.JavaVMName}</td> ! </tr> ! </table> ! <br> ! ! <font size="+2"><u>Performance</u></font> ! <br> ! <table> ! <tr> ! <td colspan="2"><object classid="MemoryGraph" width="300" height="250"></object></td> ! <td colspan="2"><object classid="ThreadGraph" width="300" height="250"></object></td> ! </tr> ! </table> ! <br> ! ! <object classid="Operations"></object> ! ! ! ]]> ! </Attribute> ! ! <Content> ! ! <!-- ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="bean" value="#serverInfo"/> ! <Attribute name="preferredSize" value="'150,150'"/> ! <Attribute name="maxAttributeName" value="'MaxMemory'"/> ! <Attribute name="currentAttributeName" value="'FreeMemory'"/> ! <Attribute name="minimumSize" value="'50,50'"/> ! <Attribute name="label" value="'Free Memory'"/> ! <Attribute name="updateInterval" value="'1000'"/> ! </Component> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="bean" value="#serverInfo"/> ! <Attribute name="preferredSize" value="'150,150'"/> ! <Attribute name="maxAttributeValue" value="'500'"/> ! <Attribute name="currentAttributeName" value="'ActiveThreadCount'"/> ! <Attribute name="minimumSize" value="'50,50'"/> ! <Attribute name="label" value="'Active Threads'"/> ! </Component> ! --> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph" id="MemoryGraph"> ! <Attribute name="chartTitle" value="'Memory Usage'"/> ! <Attribute name="preferredSize" value="'400,300'"/> ! ! <Attribute name="attribute" value="#serverInfo.getAttribute('FreeMemory')"/> ! </Component> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph" id="ThreadGraph"> ! <Attribute name="chartTitle" value="'Active Threads'"/> ! <Attribute name="preferredSize" value="'400,300'"/> ! <Attribute name="attribute" value="#serverInfo.getAttribute('ActiveThreadCount')"/> ! </Component> ! ! ! <!-- List of methods to execute --> ! <Component type="org.mc4j.console.swing.SectionHolder" id="Operations"> ! <Attribute name="title" value="'Server Control'"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="bean" value="#server"/> ! ! <Attribute name="format" ! value="@org.mc4j.console.dashboard.components.OperationListComponent@BUTTON_ONLY_FORMAT"/> ! ! </Component> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="bean" value="#serverInfo"/> ! ! <Attribute name="format" ! value="@org.mc4j.console.dashboard.components.OperationListComponent@BUTTON_ONLY_FORMAT"/> ! ! </Component> ! </Content> ! </Component> ! ! </Content> ! </Component> ! </Content> </Dashboard> --- JBoss_ServerDashboard.html DELETED --- Index: JBoss_ServerInfo_Memory.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_ServerInfo_Memory.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** JBoss_ServerInfo_Memory.xml 13 Oct 2004 04:52:45 -0000 1.5 --- JBoss_ServerInfo_Memory.xml 12 Apr 2006 17:28:34 -0000 1.5.2.1 *************** *** 1,12 **** <?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="JBoss Memory Meter"> ! <Description>This dashboard displays basic information relating to the ! overall execution of a JBoss server.</Description> <DashboardMatch type="Global" location="/JBoss"> <BeanMatch id="JBossServerInfoBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="jboss.system:type=ServerInfo"/> </BeanMatch> </DashboardMatch> --- 1,11 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="JBoss Memory Meter" autoRefresh="false" refreshControl="false" standardHeader="true"> ! <Description>JBoss server memory usage.</Description> <DashboardMatch type="Global" location="/JBoss"> <BeanMatch id="JBossServerInfoBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="jboss.system:type=ServerInfo"/> </BeanMatch> </DashboardMatch> *************** *** 19,67 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> - - <!-- *** The header section displays title and a refresh control *** --> - <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> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.NumericAttributeGaugeMeter"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Attribute name="maxAttributeName" value="(Literal)MaxMemory"/> ! <Attribute name="currentAttributeName" value="(Literal)FreeMemory"/> ! <!--<Attribute name="minimumSize" value="(Literal)50,50"/>--> ! <Attribute name="label" value="(Literal)Free Memory"/> ! <Attribute name="updateInterval" value="(Literal)1000"/> ! <Attribute name="warningPoint" value="(Literal)0.2"/> ! <Attribute name="criticalPoint" value="(Literal)0.05"/> ! <Attribute name="title" value="(Literal)Available Memory"/> ! <Attribute name="units" value="(Literal)bytes"/> ! </Component> ! </Content> </Dashboard> --- 18,37 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> + <!-- TODO: This component is broken. For some reason it pegs the cpu <Component type="org.mc4j.console.dashboard.components.NumericAttributeGaugeMeter"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="bean" value="#JBossServerInfoBean"/> ! <Attribute name="maxAttributeName" value="'MaxMemory'"/> ! <Attribute name="currentAttributeName" value="'FreeMemory'"/> ! <Attribute name="label" value="'Free Memory'"/> ! <Attribute name="updateInterval" value="1000"/> ! <Attribute name="warningPoint" value="0.2"/> ! <Attribute name="criticalPoint" value="0.05"/> ! <Attribute name="title" value="'Available Memory'"/> ! <Attribute name="units" value="'bytes'"/> </Component> ! --> ! </Content> </Dashboard> Index: JBoss_Web_Jetty.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_Web_Jetty.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** JBoss_Web_Jetty.xml 16 Apr 2004 15:49:47 -0000 1.4 --- JBoss_Web_Jetty.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,7 **** <?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="JBoss Jetty Statistics"> <Description>This dashboard shows the statistics of a Jetty servlet context.</Description> --- 1,7 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="JBoss Jetty Statistics"> <Description>This dashboard shows the statistics of a Jetty servlet context.</Description> *************** *** 9,13 **** <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="^jboss.web:Jetty=0$"/> </BeanMatch> </DashboardMatch> --- 9,13 ---- <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.web:Jetty=0$"/> </BeanMatch> </DashboardMatch> Index: JBoss_WebTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_WebTable.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** JBoss_WebTable.xml 16 Apr 2004 15:49:47 -0000 1.4 --- JBoss_WebTable.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,6 **** <?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="Web Component Statistics"> <Description>This dashboard shows the statistics of a WebLogic Execute Queue.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Web Component Statistics"> <Description>This dashboard shows the statistics of a WebLogic Execute Queue.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="VHostList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="vhost=localhost"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="VHostList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="vhost=localhost"/> </BeanMatch> </DashboardMatch> *************** *** 14,51 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> - - <!-- *** The header section displays title and a refresh control *** --> - <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)1000"/> - </Component> - </Content> - </Component> - - <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> <Attribute name="beanList" value="VHostList"/> --- 14,17 ---- Index: JBoss_MQ_QueueTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_MQ_QueueTable.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** JBoss_MQ_QueueTable.xml 16 Apr 2004 15:49:47 -0000 1.5 --- JBoss_MQ_QueueTable.xml 12 Apr 2006 17:28:34 -0000 1.5.2.1 *************** *** 1,6 **** <?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="MQ Queue Statistics"> <Description>This dashboard shows the statistics of a MQ Queues.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="MQ Queue Statistics" standardHeader="true" autoRefresh="true" refreshControl="true"> <Description>This dashboard shows the statistics of a MQ Queues.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/JBoss/MQ"> <BeanMatch id="QueueBeanList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="service=Queue"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/JBoss/MQ"> <BeanMatch id="QueueBeanList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="service=Queue"/> </BeanMatch> </DashboardMatch> *************** *** 15,66 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <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)1000"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> ! <Attribute name="beanList" value="QueueBeanList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="(Literal)name"/> ! <Attribute name="AttributeName" value="(Literal)JNDIName"/> ! <Attribute name="AttributeName" value="(Literal)StateString"/> ! <Attribute name="AttributeName" value="(Literal)QueueName"/> ! <Attribute name="AttributeName" value="(Literal)ReceiversCount"/> </Component> --- 15,34 ---- <Content> <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> ! <Attribute name="beanList" value="#QueueBeanList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Attribute name="preferredSize" value="'100,100'"/> ! <Attribute name="AttributeName" value="'name'"/> ! <Attribute name="AttributeName" value="'JNDIName'"/> ! <Attribute name="AttributeName" value="'StateString'"/> ! <Attribute name="AttributeName" value="'QueueName'"/> ! <Attribute name="AttributeName" value="'ReceiversCount'"/> </Component> Index: JBoss_MQ_TopicTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_MQ_TopicTable.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** JBoss_MQ_TopicTable.xml 16 Apr 2004 15:49:47 -0000 1.5 --- JBoss_MQ_TopicTable.xml 12 Apr 2006 17:28:34 -0000 1.5.2.1 *************** *** 1,6 **** <?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="MQ Topic Statistics"> <Description>This dashboard shows the statistics of a MQ Topics.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="MQ Topic Statistics"> <Description>This dashboard shows the statistics of a MQ Topics.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/JBoss/MQ"> <BeanMatch id="QueueTopicBeanList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="service=Topic"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/JBoss/MQ"> <BeanMatch id="QueueTopicBeanList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="service=Topic"/> </BeanMatch> </DashboardMatch> *************** *** 15,49 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <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)1000"/> - </Component> - </Content> - </Component> <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> --- 15,18 ---- *************** *** 51,67 **** <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="(Literal)Name"/> ! <Attribute name="AttributeName" value="(Literal)JNDIName"/> ! <Attribute name="AttributeName" value="(Literal)StateString"/> ! <Attribute name="AttributeName" value="(Literal)AllMessageCount"/> ! <Attribute name="AttributeName" value="(Literal)AllSubscriptionsCount"/> ! <Attribute name="AttributeName" value="(Literal)DurableMessageCount"/> ! <Attribute name="AttributeName" value="(Literal)DurableSubscriptionsCount"/> ! <Attribute name="AttributeName" value="(Literal)NonDurableMessageCount"/> ! <Attribute name="AttributeName" value="(Literal)NonDurableSubscriptionsCount"/> </Component> --- 20,36 ---- <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="'Name'"/> ! <Attribute name="AttributeName" value="'JNDIName'"/> ! <Attribute name="AttributeName" value="'StateString'"/> ! <Attribute name="AttributeName" value="'AllMessageCount'"/> ! <Attribute name="AttributeName" value="'AllSubscriptionsCount'"/> ! <Attribute name="AttributeName" value="'DurableMessageCount'"/> ! <Attribute name="AttributeName" value="'DurableSubscriptionsCount'"/> ! <Attribute name="AttributeName" value="'NonDurableMessageCount'"/> ! <Attribute name="AttributeName" value="'NonDurableSubscriptionsCount'"/> </Component> --- JBoss_ServerDashboard.xml DELETED --- Index: JBoss_System_Server_Control.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_System_Server_Control.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** JBoss_System_Server_Control.xml 19 Jan 2005 14:17:02 -0000 1.5 --- JBoss_System_Server_Control.xml 12 Apr 2006 17:28:34 -0000 1.5.2.1 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 7,16 **** --> ! <Dashboard version="1.0" name="JBoss Server Control"> <Description>This dashboard has server control operations for JBoss.</Description> <DashboardMatch type="Global" location="/JBoss"> <BeanMatch id="JBossServerNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="^jboss.system:type=Server$"/> </BeanMatch> </DashboardMatch> --- 7,17 ---- --> ! <Dashboard version="2.0" name="JBoss Server Control" autoRefresh="false" refreshControl="false" standardHeader="true"> ! <Description>This dashboard has server control operations for JBoss.</Description> <DashboardMatch type="Global" location="/JBoss"> <BeanMatch id="JBossServerNode" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.system:type=Server$"/> </BeanMatch> </DashboardMatch> *************** *** 18,49 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> ! ! <!-- *** The header section displays title and a refresh control *** --> ! <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> ! </Content> ! </Component> <Component type="javax.swing.JScrollPane"> --- 19,23 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! <Component type="javax.swing.JScrollPane"> *************** *** 54,62 **** <Content> <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="beanNode" value="JBossServerNode"/> ! <Attribute name="operationName" value="(Literal)runGarbageCollector"/> ! <Attribute name="operationName" value="(Literal)exit"/> ! <Attribute name="operationName" value="(Literal)halt"/> ! <Attribute name="operationName" value="(Literal)shutdown"/> </Component> </Content> --- 28,35 ---- <Content> <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="operation" value="#JBossServerNode.getOperation('runGarbageCollector')"/> ! <Attribute name="operation" value="#JBossServerNode.getOperation('exit')"/> ! <Attribute name="operation" value="#JBossServerNode.getOperation('halt')"/> ! <Attribute name="operation" value="#JBossServerNode.getOperation('shutdown')"/> </Component> </Content> --- NEW FILE: JBoss_Deployments.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- Created on : October 6, 2002, 10:01 PM Author : ghinkl --> <Dashboard version="2.0" name="JBoss Deployments" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>Deployed modules in a JBoss Application Server.</Description> <DashboardMatch type="Global" location="/JBoss"> <BeanMatch id="deployer" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="jboss.system:service=MainDeployer"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.OperationResultTableComponent"> <Attribute name="operation" value="#deployer.getOperation('listDeployed')"/> <Attribute name="rowKey" literal="true" value="url"/> <Attribute name="AttributeName" literal="true" value="KEY"/> <Attribute name="AttributeName" literal="true" value="status"/> <Attribute name="AttributeName" literal="true" value="#format.date(lastDeployed)"/> <Attribute name="AttributeName" literal="true" value="#format.date(lastModified)"/> </Component> </Content> </Dashboard> |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:20
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/bean/operation Modified Files: Tag: ems_module_separation OperationExecuteDescriptor.java OperationExecuteNodeAction.java OperationExecutionResultsVisualPanel.java OperationExecutionVisualPanel.java OperationNode.java OperationSetChildren.java OperationSetNode.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: OperationExecuteNodeAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationExecuteNodeAction.java,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** OperationExecuteNodeAction.java 5 Oct 2004 05:15:56 -0000 1.9 --- OperationExecuteNodeAction.java 12 Apr 2006 17:28:36 -0000 1.9.2.1 *************** *** 17,24 **** package org.mc4j.console.bean.operation; ! import java.awt.Dialog; ! ! import javax.swing.SwingUtilities; ! import org.openide.DialogDisplayer; import org.openide.ErrorManager; --- 17,21 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.DialogDisplayer; import org.openide.ErrorManager; *************** *** 29,32 **** --- 26,32 ---- import org.openide.util.actions.NodeAction; + import javax.swing.*; + import java.awt.Dialog; + /** * This action is used to execute MBean Operations against a *************** *** 39,56 **** public void performAction(Node[] nodes) { - // do work based on the current node selection, e.g.: OperationNode node = (OperationNode)nodes[0]; - // ... - // Note that casting to a type of node is often not the right - // solution; try using a CookieAction, unless it is really the - // node itself and not the underlying data that needs to be - // considered. Also remember that some tests on nodes (casts - // as well as reorderability of children etc.) will not work - // when applied to filter nodes, whereas cookies will. ! final WizardDescriptor desc = new OperationExecuteDescriptor(node.getServer(),node.getObjectName(),node.getOperationInfo()); final Dialog dlg = DialogDisplayer.getDefault().createDialog(desc); dlg.setSize(650, 600); ! // The following assumes the wizard descriptor is modal: try { --- 39,54 ---- public void performAction(Node[] nodes) { OperationNode node = (OperationNode)nodes[0]; ! performAction(node.getEmsOperation()); ! } ! ! ! public void performAction(EmsOperation operation) { ! ! final WizardDescriptor desc = new OperationExecuteDescriptor(operation); final Dialog dlg = DialogDisplayer.getDefault().createDialog(desc); dlg.setSize(650, 600); ! // The following assumes the wizard descriptor is modal: try { *************** *** 65,88 **** } if (desc.getValue() == WizardDescriptor.FINISH_OPTION) { - // Do whatever it is you want to do here. - /* - MBeanOperationInfo operationInfo = node.getOperationInfo(); - if (operationInfo.getSignature().length == 0) { - try { - - Object result = node.getServer().invoke( - node.getObjectName(), - operationInfo.getName(), - new Object[] {}, - new String[] {}); - org.openide.windows.IOProvider.getDefault().getStdOut().println("Executed operation " + - operationInfo.getName() + " on managed bean " + node.getObjectName().getCanonicalName()); - org.openide.windows.IOProvider.getDefault().getStdOut().println("Results " + result); - } catch (Exception e) { - ErrorManager.getDefault().notify(e); - } - - } - */ System.out.println("User finished the wizard"); // NOI18N --- 63,66 ---- *************** *** 90,95 **** System.out.println("User closed or cancelled the wizard"); // NOI18N } - - } --- 68,71 ---- Index: OperationNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationNode.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** OperationNode.java 5 Oct 2004 05:15:56 -0000 1.8 --- OperationNode.java 12 Apr 2006 17:28:36 -0000 1.8.2.1 *************** *** 17,119 **** package org.mc4j.console.bean.operation; ! import javax.management.MBeanOperationInfo; ! import javax.management.MBeanParameterInfo; ! import javax.management.MBeanServer; ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; /** - * * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision$($Author$ / $Date$) */ ! public class OperationNode extends AbstractNode { ! ! protected MBeanServer server; ! protected ObjectInstance objectInstance; ! protected ObjectName objectName; ! protected MBeanOperationInfo operationInfo; - /** - * @deprecated just pass object name - * @param server - * @param objectInstance - * @param operationInfo - */ - public OperationNode(MBeanServer server, ObjectInstance objectInstance, MBeanOperationInfo operationInfo) { - this(server, objectInstance.getObjectName(), operationInfo); - } ! public OperationNode(MBeanServer server, ObjectName objectName, MBeanOperationInfo operationInfo) { super(Children.LEAF); ! this.server = server; ! this.operationInfo = operationInfo; ! this.objectName = objectName; ! setIconBase("org/mc4j/console/bean/operation/OperationNodeIcon"); // Set FeatureDescriptor stuff: ! setName(this.operationInfo.getName()); ! setDisplayName(this.operationInfo.getName()); ! setShortDescription(getDescription()); setDefaultAction(SystemAction.get(OperationExecuteNodeAction.class)); - - } - - private String getDescription() { - StringBuffer buf = new StringBuffer(100); - buf.append("<html><b>"); - buf.append(this.operationInfo.getName()); - buf.append("</b><br>"); - buf.append("Description: "); - buf.append(this.operationInfo.getDescription()); - - if (this.operationInfo.getSignature().length > 0) { - buf.append("<br>Parameters:<br>"); - MBeanParameterInfo[] params = this.operationInfo.getSignature(); - for (int i = 0; i < params.length; i++) { - MBeanParameterInfo param = params[i]; - buf.append(" "); - buf.append(param.getName()); - buf.append(" - "); - buf.append(param.getType()); - buf.append("<br>"); - } - } - buf.append("Return Type: "); - buf.append(this.operationInfo.getReturnType()); - buf.append("</html>"); - return buf.toString(); } // Create the popup menu: protected SystemAction[] createActions() { ! return new SystemAction[] { ! // SystemAction.get(MyFavoriteAction.class), ! // null, // separator ! /* according to what it can do: ! SystemAction.get(CutAction.class), ! SystemAction.get(CopyAction.class), ! null, ! SystemAction.get(DeleteAction.class), ! SystemAction.get(RenameAction.class), ! null, ! */ ! SystemAction.get(OperationExecuteNodeAction.class), null, ! SystemAction.get(ToolsAction.class), null, ! SystemAction.get(PropertiesAction.class), }; } --- 17,64 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; + import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; /** * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision$($Author$ / $Date$) */ ! public class OperationNode extends AbstractNode implements Comparable { ! protected EmsOperation operation; ! public OperationNode(EmsOperation operation) { super(Children.LEAF); ! this.operation = operation; setIconBase("org/mc4j/console/bean/operation/OperationNodeIcon"); // Set FeatureDescriptor stuff: ! setName(this.operation.getName()); ! setDisplayName(this.operation.getName()); ! setShortDescription(this.operation.getDescription()); setDefaultAction(SystemAction.get(OperationExecuteNodeAction.class)); } + public EmsOperation getEmsOperation() { + return operation; + } // Create the popup menu: protected SystemAction[] createActions() { ! return new SystemAction[]{ ! SystemAction.get(OperationExecuteNodeAction.class), null, ! SystemAction.get(ToolsAction.class), null, ! SystemAction.get(PropertiesAction.class), }; } *************** *** 127,253 **** ! /** Getter for property server. ! * @return Value of property server. ! * ! */ ! public javax.management.MBeanServer getServer() { ! return server; ! } ! ! /** Setter for property server. ! * @param server New value of property server. ! * ! */ ! public void setServer(javax.management.MBeanServer server) { ! this.server = server; ! } ! ! /** Getter for property objectName. ! * @return Value of property objectName. ! * ! */ ! public javax.management.ObjectName getObjectName() { ! return objectName; ! } ! ! ! /** Getter for property operationInfo. ! * @return Value of property operationInfo. ! * ! */ ! public javax.management.MBeanOperationInfo getOperationInfo() { ! return operationInfo; ! } ! ! ! // RECOMMENDED - handle cloning specially (so as not to invoke the overhead of FilterNode): ! /* ! public Node cloneNode() { ! // Try to pass in similar constructor params to what you originally got: ! return new OperationNode(); ! } ! */ ! ! // Create a property sheet: ! /* ! protected Sheet createSheet() { ! Sheet sheet = super.createSheet(); ! // Make sure there is a "Properties" set: ! Sheet.Set props = sheet.get(Sheet.PROPERTIES); // get by name, not display name ! if (props == null) { ! props = Sheet.createPropertiesSet(); ! sheet.put(props); ! } ! props.put(new MyProp(someParams)); ! return sheet; ! } ! */ ! ! // Handle renaming: ! /* ! public boolean canRename() { ! return true; ! } ! public void setName(String nue) { ! // Update visible name, fire property changes: ! super.setName(nue); ! // perform additional actions, i.e. rename underlying object ! } ! */ ! ! // Handle deleting: ! /* ! public boolean canDestroy() { ! return true; ! } ! public void destroy() throws IOException { ! // Actually remove the node itself and fire property changes: ! super.destroy(); ! // perform additional actions, i.e. delete underlying object ! } ! */ ! ! // Handle copying and cutting specially: ! /* ! public boolean canCopy() { ! return true; ! } ! public boolean canCut() { ! return true; ! } ! public Transferable clipboardCopy() { ! // Add to, do not replace, the default node copy flavor: ! ExTransferable et = ExTransferable.create(super.clipboardCopy()); ! et.put(new ExTransferable.Single(DataFlavor.stringFlavor) { ! protected Object getData() { ! return OperationNode.this.getDisplayName(); ! } ! }); ! return et; ! } ! public Transferable clipboardCut() { ! // Add to, do not replace, the default node cut flavor: ! ExTransferable et = ExTransferable.create(super.clipboardCut()); ! // This is not so useful because this node will not be destroyed afterwards ! // (it is up to the paste type to decide whether to remove the "original", ! // and it is not safe to assume that getData will only be called once): ! et.put(new ExTransferable.Single(DataFlavor.stringFlavor) { ! protected Object getData() { ! return OperationNode.this.getDisplayName(); ! } ! }); ! return et; ! } ! */ ! ! // Permit user to customize whole node at once (instead of per-property): ! /* ! public boolean hasCustomizer() { ! return true; ! } ! public Component getCustomizer() { ! return new MyCustomizingPanel(this); } - */ } --- 72,79 ---- ! public int compareTo(Object o) { ! Node otherNode = (Node) o; ! return this.getDisplayName().compareTo(otherNode.getDisplayName()); } } Index: OperationExecuteDescriptor.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationExecuteDescriptor.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** OperationExecuteDescriptor.java 5 Oct 2004 05:15:56 -0000 1.7 --- OperationExecuteDescriptor.java 12 Apr 2006 17:28:36 -0000 1.7.2.1 *************** *** 17,31 **** package org.mc4j.console.bean.operation; ! import java.awt.Toolkit; ! import java.net.MalformedURLException; ! import java.net.URL; ! ! import javax.management.MBeanOperationInfo; ! import javax.management.MBeanServer; ! import javax.management.ObjectName; ! import org.openide.WizardDescriptor; import org.openide.util.NbBundle; /** * --- 17,28 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.WizardDescriptor; import org.openide.util.NbBundle; + import java.awt.*; + import java.net.MalformedURLException; + import java.net.URL; + /** * *************** *** 38,63 **** private final OperationExecuteIterator iterator; ! ! public static final String MBEAN_SERVER = "MBeanServer"; ! public static final String OBJECT_NAME = "ObjectName"; ! public static final String OPERATION_INFO = "OperationInfo"; public static final String PARAMETER_VALUES = "ParameterValues"; /** Make a descriptor suited to use OperationExecuteIterator. * Sets up various wizard properties to follow recommended * style guidelines. */ ! public OperationExecuteDescriptor(MBeanServer server, ObjectName objectName, MBeanOperationInfo operationInfo) { this(new OperationExecuteIterator()); ! ! putProperty(MBEAN_SERVER, server); ! putProperty(OBJECT_NAME, objectName); ! putProperty(OPERATION_INFO, operationInfo); } ! private OperationExecuteDescriptor(OperationExecuteIterator iterator) { super(iterator); this.iterator = iterator; ! this.iterator.setExecuteDescriptor(this); // Set title for the dialog: --- 35,57 ---- private final OperationExecuteIterator iterator; ! ! public static final String OPERATION = "Operation"; public static final String PARAMETER_VALUES = "ParameterValues"; + /** Make a descriptor suited to use OperationExecuteIterator. * Sets up various wizard properties to follow recommended * style guidelines. */ ! public OperationExecuteDescriptor(EmsOperation operation) { this(new OperationExecuteIterator()); ! ! putProperty(OPERATION, operation); } ! private OperationExecuteDescriptor(OperationExecuteIterator iterator) { super(iterator); this.iterator = iterator; ! this.iterator.setExecuteDescriptor(this); // Set title for the dialog: *************** *** 79,83 **** putProperty("WizardPanel_leftDimension", new Dimension(100, 400)); // NOI18N */ ! // Optional: if you want a special background image for the left pane: try { --- 73,77 ---- putProperty("WizardPanel_leftDimension", new Dimension(100, 400)); // NOI18N */ ! // Optional: if you want a special background image for the left pane: try { *************** *** 88,92 **** throw new IllegalStateException(mfue.toString()); } ! } --- 82,86 ---- throw new IllegalStateException(mfue.toString()); } ! } Index: OperationExecutionVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationExecutionVisualPanel.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** OperationExecutionVisualPanel.java 5 Oct 2004 05:15:56 -0000 1.7 --- OperationExecutionVisualPanel.java 12 Apr 2006 17:28:36 -0000 1.7.2.1 *************** *** 17,33 **** package org.mc4j.console.bean.operation; ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Dimension; ! import java.util.Map; ! ! import javax.management.MBeanOperationInfo; ! import javax.management.ObjectName; ! import javax.swing.BorderFactory; ! import javax.swing.JEditorPane; ! import javax.swing.JPanel; ! import javax.swing.JScrollPane; ! import javax.swing.UIManager; ! import org.openide.ErrorManager; import org.openide.explorer.propertysheet.PropertySheet; --- 17,22 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.console.bean.operation.execution.ExecutionNode; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.ErrorManager; import org.openide.explorer.propertysheet.PropertySheet; *************** *** 35,42 **** import org.openide.util.NbBundle; ! import org.mc4j.console.bean.operation.execution.ExecutionNode; /** - * * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision$($Author$ / $Date$) --- 24,32 ---- import org.openide.util.NbBundle; ! import javax.swing.*; ! import java.awt.*; ! import java.util.Map; /** * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision$($Author$ / $Date$) *************** *** 44,56 **** public class OperationExecutionVisualPanel extends javax.swing.JPanel { ! /** The wizard panel descriptor associated with this GUI panel. * If you need to fire state changes or something similar, you can * use this handle to do so. */ private final OperationExecutionPanel panel; ! private ExecutionNode executionNode; ! /** Create the wizard panel and set up some basic properties. */ public OperationExecutionVisualPanel(OperationExecutionPanel panel) { this.panel = panel; --- 34,49 ---- public class OperationExecutionVisualPanel extends javax.swing.JPanel { ! /** ! * The wizard panel descriptor associated with this GUI panel. * If you need to fire state changes or something similar, you can * use this handle to do so. */ private final OperationExecutionPanel panel; ! private ExecutionNode executionNode; ! /** ! * Create the wizard panel and set up some basic properties. ! */ public OperationExecutionVisualPanel(OperationExecutionPanel panel) { this.panel = panel; *************** *** 58,130 **** // Provide a name in the title bar. setName(NbBundle.getMessage(OperationExecutionVisualPanel.class, "TITLE_WizardPanel")); - - ! MBeanOperationInfo operationInfo = ! (MBeanOperationInfo) ! this.panel.getDescriptor().getProperty(OperationExecuteDescriptor.OPERATION_INFO); ! ObjectName objectName = ! (ObjectName) ! this.panel.getDescriptor().getProperty(OperationExecuteDescriptor.OBJECT_NAME); ! ! PropertySheet sheet = new PropertySheet(); - this.executionNode = new ExecutionNode(operationInfo); try { ! sheet.setNodes(new Node[] { ! executionNode ! }); ! } catch (Exception e) { ErrorManager.getDefault().notify(e); } ! JPanel topPanel = new JPanel(new BorderLayout()); topPanel.setBorder(BorderFactory.createCompoundBorder( ! BorderFactory.createMatteBorder(1,0,0,0,UIManager.getDefaults().getColor("control")), // NOI18N ! BorderFactory.createCompoundBorder( ! BorderFactory.createMatteBorder(0,0,1,1,UIManager.getDefaults().getColor("controlHighlight")), // NOI18N ! BorderFactory.createLineBorder(UIManager.getDefaults().getColor("controlDkShadow")) // NOI18N ! )) ); ! ! String info = ! "<font size='-1'><b>MBean: </b>" + objectName.getCanonicalName() + "<br>" + ! "<b>Operation: </b>" + operationInfo.getName() + "<br>" + ! "<b>Impact: </b>"; ! switch (operationInfo.getImpact()) { ! case MBeanOperationInfo.ACTION: ! info += "This operation alters the state of this component.<br>"; ! break; ! case MBeanOperationInfo.ACTION_INFO: ! info += "This operation alters the state of this component and returns information.<br>"; ! break; ! case MBeanOperationInfo.INFO: ! info += "This operation merly returns information.<br>"; ! break; ! case MBeanOperationInfo.UNKNOWN: ! info += "unknown<br>"; ! break; } ! info += "<b>Return Type: </b> " + operationInfo.getReturnType() + "<br>"; info += "<b>Description: </b><br>"; ! info += "<blockquote>" + operationInfo.getDescription() + "</blockquote></font>"; ! ! JEditorPane jta = new JEditorPane("text/html", info); jta.setBackground(Color.lightGray); jta.setEditable(false); jta.setPreferredSize(new Dimension(0, 150)); ! JScrollPane topPanelScrollPane = new JScrollPane(); topPanelScrollPane.setViewportView(jta); ! topPanel.add(topPanelScrollPane, BorderLayout.CENTER); add(topPanel, BorderLayout.NORTH); ! add(sheet, BorderLayout.CENTER); ! repaint(); ! } --- 51,115 ---- // Provide a name in the title bar. setName(NbBundle.getMessage(OperationExecutionVisualPanel.class, "TITLE_WizardPanel")); ! EmsOperation operation = ! (EmsOperation) this.panel.getDescriptor().getProperty(OperationExecuteDescriptor.OPERATION); + PropertySheet sheet = new PropertySheet(); + + this.executionNode = new ExecutionNode(operation); try { ! sheet.setNodes(new Node[]{ ! executionNode ! }); ! } catch (Exception e) { ! ErrorManager.getDefault().notify(e); ! } ! JPanel topPanel = new JPanel(new BorderLayout()); topPanel.setBorder(BorderFactory.createCompoundBorder( ! BorderFactory.createMatteBorder(1, 0, 0, 0, UIManager.getDefaults().getColor("control")), // NOI18N ! BorderFactory.createCompoundBorder( ! BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getDefaults().getColor("controlHighlight")), // NOI18N ! BorderFactory.createLineBorder(UIManager.getDefaults().getColor("controlDkShadow")) // NOI18N ! )) ); ! ! String info = ! "<font size='-1'><b>MBean: </b>" + operation + "<br>" + ! "<b>Operation: </b>" + operation.getName() + "<br>" + ! "<b>Impact: </b>"; ! if (EmsOperation.Impact.ACTION.equals(operation.getImpact())) { ! info += "This operation alters the state of this component.<br>"; ! } else if (EmsOperation.Impact.ACTION_INFO.equals(operation.getImpact())) { ! info += "This operation alters the state of this component and returns information.<br>"; ! } else if (EmsOperation.Impact.ACTION.equals(operation.getImpact())) { ! info += "This operation merly returns information.<br>"; ! } else { ! info += "unknown<br>"; } ! ! info += "<b>Return Type: </b> " + operation.getReturnType() + "<br>"; info += "<b>Description: </b><br>"; ! info += "<blockquote>" + operation.getDescription() + "</blockquote></font>"; ! ! JEditorPane jta = new JEditorPane("text/html", info); jta.setBackground(Color.lightGray); jta.setEditable(false); jta.setPreferredSize(new Dimension(0, 150)); ! JScrollPane topPanelScrollPane = new JScrollPane(); topPanelScrollPane.setViewportView(jta); ! topPanel.add(topPanelScrollPane, BorderLayout.CENTER); add(topPanel, BorderLayout.NORTH); ! add(sheet, BorderLayout.CENTER); ! repaint(); ! } *************** *** 132,138 **** return this.executionNode.getParameterValues(); } ! ! ! /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is --- 117,124 ---- return this.executionNode.getParameterValues(); } ! ! ! /** ! * This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is Index: OperationExecutionResultsVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationExecutionResultsVisualPanel.java,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** OperationExecutionResultsVisualPanel.java 5 Oct 2004 05:15:56 -0000 1.12 --- OperationExecutionResultsVisualPanel.java 12 Apr 2006 17:28:36 -0000 1.12.2.1 *************** *** 17,42 **** package org.mc4j.console.bean.operation; ! import java.awt.Rectangle; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Map; import java.util.Map.Entry; - import java.util.Vector; - - import javax.management.MBeanOperationInfo; - import javax.management.MBeanParameterInfo; - import javax.management.MBeanServer; - import javax.management.ObjectName; - import javax.management.ReflectionException; - import javax.swing.JList; - import javax.swing.JPanel; - import javax.swing.JTable; - import javax.swing.SwingUtilities; - - import org.openide.util.NbBundle; - - import org.mc4j.console.util.ExceptionUtility; /** --- 17,32 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.console.util.ExceptionUtility; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; ! import org.mc4j.ems.connection.bean.parameter.EmsParameter; ! import org.openide.util.NbBundle; ! ! import javax.swing.*; ! import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; ! import java.util.*; ! import java.util.List; import java.util.Map.Entry; /** *************** *** 54,144 **** private Object results; ! private Throwable failure; ! /** Create the wizard panel and set up some basic properties. */ public OperationExecutionResultsVisualPanel(OperationExecutionResultsPanel panel) { this.panel = panel; initComponents(); ! this.textTypeCheckbox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { ! //if (e.getStateChange() == ItemEvent.ITEM_STATE_CHANGED) { switchView(); //} }}); ! // Provide a name in the title bar. setName(NbBundle.getMessage(OperationExecutionResultsVisualPanel.class, "TITLE_WizardPanel")); /* ! // Optional: provide a special description for this pane. ! // You must have turned on WizardDescriptor.WizardPanel_helpDisplayed ! // (see descriptor in standard iterator template for an example of this). ! try { ! putClientProperty("WizardPanel_helpURL", // NOI18N ! new URL("nbresloc:/org/mc4j/console/bean/operation/OperationExecutionResultsVisualHelp.html")); // NOI18N ! } catch (MalformedURLException mfue) { ! throw new IllegalStateException(mfue.toString()); ! } ! */ ! //executeOperation(); } ! public void executeOperation() { ! final MBeanServer server = ! (MBeanServer) ! panel.getDescriptor().getProperty(OperationExecuteDescriptor.MBEAN_SERVER); ! ! final MBeanOperationInfo operationInfo = ! (MBeanOperationInfo) ! panel.getDescriptor().getProperty(OperationExecuteDescriptor.OPERATION_INFO); ! ! final ObjectName objectName = ! (ObjectName) ! panel.getDescriptor().getProperty(OperationExecuteDescriptor.OBJECT_NAME); ! final Map parameters = (Map) panel.getDescriptor().getProperty(OperationExecuteDescriptor.PARAMETER_VALUES); ! try { ! ! MBeanParameterInfo[] params = ! operationInfo.getSignature(); ! ! final Object[] parameterValues = new Object[params.length]; ! final String[] parameterTypes = new String[params.length]; ! ! for (int i=0; i < params.length; i++) { ! String name = params[i].getName(); ! parameterValues[i] = parameters.get(name); ! parameterTypes[i] = params[i].getType(); } ! this.resultsEditorPane.setContentType("text/html"); setText("<h3>Waiting for results...</h3>"); ! Runnable execution = new Runnable() { public void run() { try { ! results = ! server.invoke( ! objectName, ! operationInfo.getName(), ! parameterValues, ! parameterTypes); resultsEditorPane.setContentType("text/html"); displayData(); - } catch (ReflectionException re) { - Throwable cause = re.getTargetException(); - if (cause != null) { - failure = cause; - } else { - failure = re; - } - setText(ExceptionUtility.printStackTracesToString(failure)); } catch (Exception e) { failure = e; --- 44,108 ---- private Object results; ! private Throwable failure; ! /** Create the wizard panel and set up some basic properties. */ public OperationExecutionResultsVisualPanel(OperationExecutionResultsPanel panel) { this.panel = panel; initComponents(); ! this.textTypeCheckbox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { ! //if (e.getStateChange() == ItemEvent.ITEM_STATE_CHANGED) { switchView(); //} }}); ! // Provide a name in the title bar. setName(NbBundle.getMessage(OperationExecutionResultsVisualPanel.class, "TITLE_WizardPanel")); /* ! // Optional: provide a special description for this pane. ! // You must have turned on WizardDescriptor.WizardPanel_helpDisplayed ! // (see descriptor in standard iterator template for an example of this). ! try { ! putClientProperty("WizardPanel_helpURL", // NOI18N ! new URL("nbresloc:/org/mc4j/console/bean/operation/OperationExecutionResultsVisualHelp.html")); // NOI18N ! } catch (MalformedURLException mfue) { ! throw new IllegalStateException(mfue.toString()); ! } ! */ ! //executeOperation(); } ! public void executeOperation() { ! ! final EmsOperation operation = (EmsOperation) panel.getDescriptor().getProperty(OperationExecuteDescriptor.OPERATION); final Map parameters = (Map) panel.getDescriptor().getProperty(OperationExecuteDescriptor.PARAMETER_VALUES); ! try { ! ! List<EmsParameter> params = operation.getParameters(); ! ! ! final Object[] arguments = new Object[params.size()]; ! for (int i = 0; i < params.size(); i++) { ! EmsParameter param = params.get(i); ! arguments[i] = parameters.get(param.getName()); } ! this.resultsEditorPane.setContentType("text/html"); setText("<h3>Waiting for results...</h3>"); ! Runnable execution = new Runnable() { public void run() { try { ! results = operation.invoke(arguments); resultsEditorPane.setContentType("text/html"); displayData(); } catch (Exception e) { failure = e; *************** *** 147,165 **** } }; ! // Need to run this outside the AWT update thread // so as not to freeze the UI in case of failed connection. (new Thread(execution, "mc4j OperationExecution")).start(); ! } catch (Exception e) { this.failure = e; setText(ExceptionUtility.printStackTracesToString(e)); ! } ! ! } private void displayData() { ! if (this.failure != null) { setText(ExceptionUtility.printStackTracesToString(this.failure)); --- 111,129 ---- } }; ! // Need to run this outside the AWT update thread // so as not to freeze the UI in case of failed connection. (new Thread(execution, "mc4j OperationExecution")).start(); ! } catch (Exception e) { this.failure = e; setText(ExceptionUtility.printStackTracesToString(e)); ! } ! ! } private void displayData() { ! if (this.failure != null) { setText(ExceptionUtility.printStackTracesToString(this.failure)); *************** *** 182,186 **** doLayout(); } else if (this.results instanceof Map) { ! Iterator iter = ((Map)this.results).entrySet().iterator(); Vector data = new Vector(); --- 146,150 ---- doLayout(); } else if (this.results instanceof Map) { ! Iterator iter = ((Map)this.results).entrySet().iterator(); Vector data = new Vector(); *************** *** 199,203 **** doLayout(); } else if (this.results.getClass().isArray()) { ! JList list = new JList((Object[]) this.results); resultsScrollPane.setViewportView(list); doLayout(); --- 163,167 ---- doLayout(); } else if (this.results.getClass().isArray()) { ! JList list = new JList((Object[]) this.results); resultsScrollPane.setViewportView(list); doLayout(); *************** *** 207,215 **** } this.textTypeCheckbox.setEnabled(!complexType); ! } validate(); this.repaint(); } ! /** This method is called from within the constructor to * initialize the form. --- 171,179 ---- } this.textTypeCheckbox.setEnabled(!complexType); ! } validate(); this.repaint(); } ! /** This method is called from within the constructor to * initialize the form. *************** *** 236,240 **** }//GEN-END:initComponents ! public void switchView() { boolean isHtml = this.textTypeCheckbox.isSelected(); --- 200,204 ---- }//GEN-END:initComponents ! public void switchView() { boolean isHtml = this.textTypeCheckbox.isSelected(); *************** *** 248,252 **** displayData(); } ! public void setText(String text) { this.resultsEditorPane.setText(text); --- 212,216 ---- displayData(); } ! public void setText(String text) { this.resultsEditorPane.setText(text); *************** *** 258,262 **** }); } ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox textTypeCheckbox; --- 222,226 ---- }); } ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox textTypeCheckbox; Index: OperationSetNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationSetNode.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** OperationSetNode.java 5 Oct 2004 05:15:56 -0000 1.5 --- OperationSetNode.java 12 Apr 2006 17:28:36 -0000 1.5.2.1 *************** *** 25,28 **** --- 25,29 ---- import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; + import org.mc4j.ems.connection.bean.EmsBean; /** *************** *** 34,40 **** public static final String NAME = "Operations"; - public OperationSetNode() { - super(new OperationSetChildren()); //new Children.SortedArray()); setIconBase("org/mc4j/console/bean/operation/OperationSetNodeIcon"); // Set FeatureDescriptor stuff: --- 35,44 ---- public static final String NAME = "Operations"; + private EmsBean emsBean; + + public OperationSetNode(EmsBean emsBean) { + super(new OperationSetChildren(emsBean)); //new Children.SortedArray()); + this.emsBean = emsBean; setIconBase("org/mc4j/console/bean/operation/OperationSetNodeIcon"); // Set FeatureDescriptor stuff: Index: OperationSetChildren.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationSetChildren.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** OperationSetChildren.java 5 Oct 2004 05:15:56 -0000 1.4 --- OperationSetChildren.java 12 Apr 2006 17:28:36 -0000 1.4.2.1 *************** *** 17,27 **** package org.mc4j.console.bean.operation; ! import java.util.Collections; ! import java.util.LinkedList; ! import java.util.List; ! import org.openide.nodes.Children; import org.openide.nodes.Node; /** * --- 17,27 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.nodes.Children; import org.openide.nodes.Node; + import java.util.SortedSet; + /** * *************** *** 29,83 **** * @version $Revision$($Author$ / $Date$) */ ! public class OperationSetChildren extends Children.Keys { ! /** Optional holder for the keys, to be used when changing them dynamically. */ ! protected List myKeys; ! public OperationSetChildren() { ! myKeys = null; } protected void addNotify() { super.addNotify(); - if (myKeys != null) return; - myKeys = new LinkedList(); - // add whatever keys you need - setKeys(myKeys); - } ! protected void removeNotify() { ! myKeys = null; ! setKeys(Collections.EMPTY_SET); ! super.removeNotify(); ! } ! ! protected Node[] createNodes(Object key) { ! // interpret your key here...usually one node generated, but could be zero or more ! return new Node[] { /*new MyNode((MyParameter)key) */}; ! } ! /** Optional accessor method for the keys, for use by the container node or maybe subclasses. */ ! /* ! protected addKey(Object newKey) { ! // Make sure some keys already exist: ! addNotify(); ! myKeys.add(newKey); ! // Ensure that the node(s) is displayed: ! refreshKey(newKey); ! } ! */ - /** Optional accessor method for keys, for use by the container node or maybe subclasses. */ - /* - protected void setKeys(Collection keys) { - myKeys = new LinkedList(); - myKeys.addAll(keys); - super.setKeys(keys); } - */ - - // Could also write e.g. removeKey to be used by the nodes in this children. - // Or, could listen to changes in their status (NodeAdapter.nodeDestroyed) - // and automatically remove them from the keys list here. Etc. - } --- 29,53 ---- * @version $Revision$($Author$ / $Date$) */ ! public class OperationSetChildren extends Children.SortedArray { ! private EmsBean emsBean; ! public OperationSetChildren(EmsBean emsBean) { ! this.emsBean = emsBean; } protected void addNotify() { super.addNotify(); ! SortedSet<EmsOperation> operations = emsBean.getOperations(); ! Node[] newNodes = new Node[operations.size()]; ! int i = 0; ! for (EmsOperation operation : operations) { ! OperationNode node = new OperationNode(operation); ! newNodes[i++] = node; ! } ! add(newNodes); } } |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/bean/attribute/watch/monitor Modified Files: Tag: ems_module_separation BeanMonitorNode.java MonitorFactory.java StartMonitoringAction.java StopMonitoringAction.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: StartMonitoringAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor/StartMonitoringAction.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** StartMonitoringAction.java 5 Oct 2004 05:15:55 -0000 1.2 --- StartMonitoringAction.java 12 Apr 2006 17:28:36 -0000 1.2.2.1 *************** *** 17,40 **** package org.mc4j.console.bean.attribute.watch.monitor; - import java.awt.Color; - import java.math.BigDecimal; - import java.math.BigInteger; - import java.util.HashSet; - import java.util.Set; - - import javax.management.MBeanAttributeInfo; - import javax.management.ObjectName; - import javax.swing.SwingUtilities; - import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.attribute.AttributeNode; - import org.mc4j.console.bean.attribute.AttributeGraphPanel; - import org.mc4j.console.bean.attribute.watch.monitor.MonitorFactory; - import org.mc4j.console.bean.attribute.watch.MonitorTopComponent; - /** * Action sensitive to the node selection that does something useful. --- 17,24 ---- Index: BeanMonitorNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor/BeanMonitorNode.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** BeanMonitorNode.java 5 Oct 2004 05:15:55 -0000 1.2 --- BeanMonitorNode.java 12 Apr 2006 17:28:36 -0000 1.2.2.1 *************** *** 18,67 **** import org.jfree.ui.ExtensionFileFilter; ! ! import java.io.File; ! import java.io.FileFilter; ! import java.io.IOException; ! import java.net.MalformedURLException; ! import java.net.URL; ! import java.net.URLClassLoader; ! import java.util.HashMap; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.Set; ! import java.util.Date; ! import java.util.ArrayList; ! import java.util.Timer; ! import java.util.TimerTask; ! import java.lang.reflect.InvocationTargetException; ! import java.beans.PropertyEditor; ! import java.beans.PropertyEditorSupport; ! ! import javax.swing.Action; ! import javax.swing.JOptionPane; ! import javax.swing.JFileChooser; ! import org.openide.ErrorManager; - import org.openide.modules.InstalledFileLocator; - import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; - import org.openide.nodes.Sheet; - import org.openide.nodes.PropertySupport; import org.openide.util.HelpCtx; - import org.openide.util.NbBundle; - import org.openide.util.actions.NodeAction; ! import org.mc4j.console.connection.persistence.ConnectionSetDatabase; ! import org.mc4j.console.connection.persistence.ConnectionSettings; ! import org.mc4j.console.ConnectAction; ! import org.mc4j.console.IConnectionNode; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.watch.log.Logger; ! import org.mc4j.console.bean.attribute.watch.log.AttributeLogger; ! import org.mc4j.console.bean.attribute.watch.monitor.StartMonitoringAction; ! import org.mc4j.console.bean.attribute.watch.monitor.StopMonitoringAction; ! import org.mc4j.console.bean.attribute.watch.monitor.AbstractMonitorNode; ! import org.mc4j.console.bean.attribute.AttributeNode; /** --- 18,33 ---- import org.jfree.ui.ExtensionFileFilter; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.bean.attribute.watch.log.AttributeLogger; ! import org.mc4j.console.bean.attribute.watch.log.Logger; import org.openide.ErrorManager; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.util.HelpCtx; ! import javax.swing.*; ! import java.io.File; ! import java.io.IOException; /** Index: MonitorFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor/MonitorFactory.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** MonitorFactory.java 5 Oct 2004 05:15:55 -0000 1.2 --- MonitorFactory.java 12 Apr 2006 17:28:36 -0000 1.2.2.1 *************** *** 17,29 **** package org.mc4j.console.bean.attribute.watch.monitor; - import org.openide.ErrorManager; - import org.mc4j.console.bean.attribute.AttributeNode; - import javax.management.monitor.CounterMonitor; import javax.management.monitor.CounterMonitorMBean; - import javax.management.ObjectName; - import javax.management.ObjectInstance; - import javax.management.MBeanServerInvocationHandler; --- 17,24 ---- package org.mc4j.console.bean.attribute.watch.monitor; import org.mc4j.console.bean.attribute.AttributeNode; + import org.openide.ErrorManager; import javax.management.monitor.CounterMonitorMBean; *************** *** 40,49 **** try { ! String domain = node.getServer().getDefaultDomain(); ! ObjectName counterMonitorName = new ObjectName(domain + ":name=CounterMonitor" + monitorIndex++); ! ObjectInstance instance = ! node.getServer().createMBean("javax.management.monitor.CounterMonitor", counterMonitorName); --- 35,44 ---- try { ! // String domain = node.getServer().getDefaultDomain(); ! // ObjectName counterMonitorName = new ObjectName(domain + ":name=CounterMonitor" + monitorIndex++); ! // ObjectInstance instance = ! // node.getServer().createMBean("javax.management.monitor.CounterMonitor", counterMonitorName); *************** *** 60,65 **** //monitor.addObservedObject(node.getObjectName()); ! node.getServer().addNotificationListener( ! instance.getObjectName(), new MonitorListener(), null, null); monitor.start(); --- 55,60 ---- //monitor.addObservedObject(node.getObjectName()); ! // node.getServer().addNotificationListener( ! // instance.getObjectName(), new MonitorListener(), null, null); monitor.start(); Index: StopMonitoringAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor/StopMonitoringAction.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** StopMonitoringAction.java 5 Oct 2004 05:15:55 -0000 1.2 --- StopMonitoringAction.java 12 Apr 2006 17:28:36 -0000 1.2.2.1 *************** *** 17,40 **** package org.mc4j.console.bean.attribute.watch.monitor; - import java.awt.Color; - import java.math.BigDecimal; - import java.math.BigInteger; - import java.util.HashSet; - import java.util.Set; - - import javax.management.MBeanAttributeInfo; - import javax.management.ObjectName; - import javax.swing.SwingUtilities; - import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.attribute.AttributeNode; - import org.mc4j.console.bean.attribute.AttributeGraphPanel; - import org.mc4j.console.bean.attribute.watch.monitor.MonitorFactory; - import org.mc4j.console.bean.attribute.watch.MonitorTopComponent; - /** * Action sensitive to the node selection that does something useful. --- 17,24 ---- |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:20
|
Update of /cvsroot/mc4j/mc4j/doc-build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/doc-build Modified Files: Tag: ems_module_separation Download.xml index.xml mc4j-docs.xsl module.xml Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: mc4j-docs.xsl =================================================================== RCS file: /cvsroot/mc4j/mc4j/doc-build/mc4j-docs.xsl,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** mc4j-docs.xsl 10 Nov 2004 15:44:59 -0000 1.8 --- mc4j-docs.xsl 12 Apr 2006 17:28:35 -0000 1.8.2.1 *************** *** 474,490 **** <xsl:choose> <xsl:when test="$module-menu != 'menu' and not(starts-with(@src,'/'))"> ! <img src="{$imgPath}/{$src}"/> </xsl:when> <xsl:when test="$module-menu = 'menu' and not(starts-with(@src, '/'))"> ! <img src="{$src}"/> </xsl:when> <xsl:when test="starts-with(@src, '/')"> ! <img src="{$rootPath}{$src}"/> </xsl:when> <xsl:otherwise> ! <img src="{$imgPath}/{$src}"/> </xsl:otherwise> </xsl:choose> --- 474,490 ---- <xsl:choose> <xsl:when test="$module-menu != 'menu' and not(starts-with(@src,'/'))"> ! <img border="0" src="{$imgPath}/{$src}"/> </xsl:when> <xsl:when test="$module-menu = 'menu' and not(starts-with(@src, '/'))"> ! <img border="0" src="{$src}"/> </xsl:when> <xsl:when test="starts-with(@src, '/')"> ! <img border="0" src="{$rootPath}{$src}"/> </xsl:when> <xsl:otherwise> ! <img border="0" src="{$imgPath}/{$src}"/> </xsl:otherwise> </xsl:choose> Index: index.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/doc-build/index.xml,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -d -r1.15 -r1.15.2.1 *** index.xml 19 Jan 2005 14:14:49 -0000 1.15 --- index.xml 12 Apr 2006 17:28:35 -0000 1.15.2.1 *************** *** 19,22 **** --- 19,23 ---- <section name="Introduction"> + <p> This software connects to J2EE application servers in order to expose *************** *** 25,31 **** --- 26,53 ---- monitor operation and execute tasks. </p> + <p> + Also, visit the <a href="/wiki">JMXWiki</a> to share tips about MC4J and JMX in general. + <a href="/wiki" style="float: right;"><img align="right" src="images/wiki.png" border="0"/></a> + </p> </section> <section name="News"> + <subsection name="MC4J 1.2 beta 9 released! (3/14/05)"> + <table> + <tr> + <td width="*"> + + <p> + This release is primarily to fix bugs with the WebLogic and WebSphere Studio + support. Sorry it took so long.<ul> + <li>WebLogic 6, 7 and 8.1 support fixed</li> + <li>WebSphere Studio test environment support added</li> + </ul> + </p> + + </td> + </tr> + </table> + </subsection> <subsection name="MC4J 1.2 beta 8 released! (1/18/05)"> *************** *** 239,244 **** <tr> <td style="font-weight: bold; border-bottom: .75pt solid silver; background-color: #87ADCB"> ! <a href="http://www.pramati.com/">Sun JSAS</a></td> ! <td style="border-bottom: .75pt solid silver">8<br/></td> </tr> <tr> --- 261,266 ---- <tr> <td style="font-weight: bold; border-bottom: .75pt solid silver; background-color: #87ADCB"> ! <a href="http://www.sun.com/appserver">Sun JSAS</a></td> ! <td style="border-bottom: .75pt solid silver">8<br/>8.1</td> </tr> <tr> Index: Download.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/doc-build/Download.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** Download.xml 19 Jan 2005 14:14:49 -0000 1.5 --- Download.xml 12 Apr 2006 17:28:35 -0000 1.5.2.1 *************** *** 26,29 **** --- 26,77 ---- + <subsection name="Download MC4J 1.2 beta 9 (March 14th, 2005)"> + <p> + + <a href="http://mc4j.sourceforge.net/wiki/index.php/MC4J">Known Issues</a> + <table style="border: 1pt solid silver; background-color: #DDE6E6"> + <tr> + <td colspan="2" style="font-size: 18;background-color: #6998BE">Installers</td> + </tr> + + <tr> + <td style="font-weight: bold; border-bottom: .75pt solid silver" width="200"> + <img src="images/linux.gif"/>Linux + </td> + <td style="border-bottom: .75pt solid silver"> + <a href="http://prdownloads.sourceforge.net/mc4j/MC4J12b9-Linux.bin?download">Download</a> + </td> + </tr> + + <tr> + <td style="font-weight: bold; border-bottom: .75pt solid silver"> + <img src="images/mac.gif"/>Mac OS X 10.3+ + </td> + <td style="border-bottom: .75pt solid silver"> + <a href="http://prdownloads.sourceforge.net/mc4j/MC4J-12b9-MacOSX.zip?download">Download</a> + </td> + </tr> + + <tr> + <td style="font-weight: bold; border-bottom: .75pt solid silver"> + <img src="images/win.gif"/>Windows + </td> + <td style="border-bottom: .75pt solid silver"> + <a href="http://prdownloads.sourceforge.net/mc4j/MC4J-12b9-Windows.exe?download">Download</a> + </td> + </tr> + <tr> + <td style="font-weight: bold; border-bottom: .75pt solid silver"> + <img src="images/solaris.gif"/>Other (Solaris, etc.) + </td> + <td style="border-bottom: .75pt solid silver"> + <a href="http://prdownloads.sourceforge.net/mc4j/MC4J12b9-Java.jar?download">Download</a> + </td> + </tr> + </table> + </p> + </subsection> + + <subsection name="Download MC4J 1.2 beta 8 (January 18th, 2005)"> <p> Index: module.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/doc-build/module.xml,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** module.xml 10 Nov 2004 15:44:59 -0000 1.11 --- module.xml 12 Apr 2006 17:28:35 -0000 1.11.2.1 *************** *** 17,20 **** --- 17,21 ---- <item name="User Guide" href="guide/index.html"/> <item name="Dashboard Guide" href="dashboard-dev/index.html"/> + <item name="JMX Wiki" href="/wiki"/> </menu> *************** *** 25,28 **** --- 26,30 ---- <item name="MX4J" href="usageMX4J.html"/> <item name="OC4J" href="usageOC4J.html"/> + <item name="SJSAS" href="usageSJAS.html"/> <item name="Tomcat" href="usageTomcat.html"/> <item name="WebLogic" href="usageWebLogic.html"/> |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:19
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/bean/attribute/watch Modified Files: Tag: ems_module_separation CreateMonitorAction.java MonitorRootNode.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: MonitorRootNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/MonitorRootNode.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** MonitorRootNode.java 5 Oct 2004 05:15:55 -0000 1.2 --- MonitorRootNode.java 12 Apr 2006 17:28:36 -0000 1.2.2.1 *************** *** 17,47 **** package org.mc4j.console.bean.attribute.watch; ! import java.io.File; ! import java.io.FileFilter; ! import java.net.MalformedURLException; ! import java.net.URL; ! import java.net.URLClassLoader; ! import java.util.HashMap; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.Set; ! ! import javax.swing.Action; ! import javax.swing.JOptionPane; ! ! import org.openide.ErrorManager; ! import org.openide.modules.InstalledFileLocator; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.util.HelpCtx; - import org.openide.util.NbBundle; import org.openide.util.actions.NodeAction; ! import org.mc4j.console.connection.persistence.ConnectionSetDatabase; ! import org.mc4j.console.connection.persistence.ConnectionSettings; ! import org.mc4j.console.ConnectAction; ! import org.mc4j.console.IConnectionNode; /** --- 17,28 ---- package org.mc4j.console.bean.attribute.watch; ! import org.mc4j.console.ConnectAction; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; ! import javax.swing.*; /** Index: CreateMonitorAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/CreateMonitorAction.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** CreateMonitorAction.java 5 Oct 2004 05:15:55 -0000 1.2 --- CreateMonitorAction.java 12 Apr 2006 17:28:36 -0000 1.2.2.1 *************** *** 17,40 **** package org.mc4j.console.bean.attribute.watch; ! import java.awt.Color; ! import java.math.BigDecimal; ! import java.math.BigInteger; ! import java.util.HashSet; ! import java.util.Set; ! ! import javax.management.MBeanAttributeInfo; ! import javax.management.ObjectName; ! import javax.swing.SwingUtilities; ! import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.attribute.AttributeNode; - import org.mc4j.console.bean.attribute.AttributeGraphPanel; - import org.mc4j.console.bean.attribute.watch.monitor.MonitorFactory; - import org.mc4j.console.bean.attribute.watch.monitor.BeanMonitorNode; - /** * Action sensitive to the node selection that does something useful. --- 17,26 ---- package org.mc4j.console.bean.attribute.watch; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.bean.attribute.watch.monitor.BeanMonitorNode; import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; /** * Action sensitive to the node selection that does something useful. *************** *** 49,53 **** protected void performAction(Node[] nodes) { // do work based on the current node selection, e.g.: ! AttributeNode node = (AttributeNode)nodes[0]; // ... // Note that casting to a type of node is often not the right --- 35,39 ---- protected void performAction(Node[] nodes) { // do work based on the current node selection, e.g.: ! AttributeNode node = (AttributeNode) nodes[0]; // ... // Note that casting to a type of node is often not the right *************** *** 63,67 **** AttributeNode[] attributeNodes = new AttributeNode[nodes.length]; ! System.arraycopy(nodes,0,attributeNodes, 0, nodes.length); beanMonitorNode.setAttributeNodes(attributeNodes); --- 49,53 ---- AttributeNode[] attributeNodes = new AttributeNode[nodes.length]; ! System.arraycopy(nodes, 0, attributeNodes, 0, nodes.length); beanMonitorNode.setAttributeNodes(attributeNodes); *************** *** 71,75 **** protected boolean enable(Node[] nodes) { ! for (int i = 0; i < nodes.length; i++) { if (!(nodes[i] instanceof AttributeNode)) { return false; --- 57,61 ---- protected boolean enable(Node[] nodes) { ! for (int i = 0; i < nodes.length; i++) { if (!(nodes[i] instanceof AttributeNode)) { return false; *************** *** 81,85 **** - public String getName() { return "Create watch..."; --- 67,70 ---- |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/bean/notification Modified Files: Tag: ems_module_separation NotificationNode.java NotificationSetChildren.java NotificationSetNode.java Removed Files: Tag: ems_module_separation NotificationNameComparator.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: NotificationSetChildren.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/NotificationSetChildren.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** NotificationSetChildren.java 5 Oct 2004 05:15:56 -0000 1.5 --- NotificationSetChildren.java 12 Apr 2006 17:28:36 -0000 1.5.2.1 *************** *** 17,27 **** package org.mc4j.console.bean.notification; ! import java.util.Collections; ! import java.util.LinkedList; ! import java.util.List; ! import org.openide.nodes.Children; import org.openide.nodes.Node; /** * --- 17,27 ---- package org.mc4j.console.bean.notification; ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.notification.EmsNotification; import org.openide.nodes.Children; import org.openide.nodes.Node; + import java.util.SortedSet; + /** * *************** *** 29,83 **** * @version $Revision$($Author$ / $Date$) */ ! public class NotificationSetChildren extends Children.Keys { /** Optional holder for the keys, to be used when changing them dynamically. */ ! protected List myKeys; ! public NotificationSetChildren() { ! myKeys = null; } protected void addNotify() { super.addNotify(); - if (myKeys != null) return; - myKeys = new LinkedList(); - // add whatever keys you need - setKeys(myKeys); - } - - protected void removeNotify() { - myKeys = null; - setKeys(Collections.EMPTY_SET); - super.removeNotify(); - } ! protected Node[] createNodes(Object key) { ! // interpret your key here...usually one node generated, but could be zero or more ! return new Node[] { /*new MyNode((MyParameter)key) */}; ! } ! ! /** Optional accessor method for the keys, for use by the container node or maybe subclasses. */ ! /* ! protected addKey(Object newKey) { ! // Make sure some keys already exist: ! addNotify(); ! myKeys.add(newKey); ! // Ensure that the node(s) is displayed: ! refreshKey(newKey); ! } ! */ ! /** Optional accessor method for keys, for use by the container node or maybe subclasses. */ ! /* ! protected void setKeys(Collection keys) { ! myKeys = new LinkedList(); ! myKeys.addAll(keys); ! super.setKeys(keys); } - */ - - // Could also write e.g. removeKey to be used by the nodes in this children. - // Or, could listen to changes in their status (NodeAdapter.nodeDestroyed) - // and automatically remove them from the keys list here. Etc. - } --- 29,54 ---- * @version $Revision$($Author$ / $Date$) */ ! public class NotificationSetChildren extends Children.SortedArray { /** Optional holder for the keys, to be used when changing them dynamically. */ ! protected EmsBean emsBean; ! ! public NotificationSetChildren(EmsBean emsBean) { ! this.emsBean = emsBean; } protected void addNotify() { super.addNotify(); ! SortedSet<EmsNotification> notifications = emsBean.getNotifications(); ! Node[] newNodes = new Node[notifications.size()]; ! int i = 0; ! for (EmsNotification notification : notifications) { ! NotificationNode node = new NotificationNode(notification); ! newNodes[i++] = node; ! } ! add(newNodes); } } --- NotificationNameComparator.java DELETED --- Index: NotificationSetNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/NotificationSetNode.java,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** NotificationSetNode.java 5 Oct 2004 05:15:56 -0000 1.6 --- NotificationSetNode.java 12 Apr 2006 17:28:36 -0000 1.6.2.1 *************** *** 24,27 **** --- 24,28 ---- import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; + import org.mc4j.ems.connection.bean.EmsBean; /** *************** *** 34,47 **** public static final String NAME = "Notifications"; ! public NotificationSetNode() { ! super(new NotificationSetChildren()); ! setIconBase("org/mc4j/console/bean/notification/NotificationSetNodeIcon"); ! // Set FeatureDescriptor stuff: setName(NAME); // or, super.setName if needed setDisplayName(java.util.ResourceBundle.getBundle("org/mc4j/console/bean/notification/Bundle").getString("LBL_NotificationSetNode")); setShortDescription(java.util.ResourceBundle.getBundle("org/mc4j/console/bean/notification/Bundle").getString("DESCRIPTION_NotificationSetNode")); ! } --- 35,48 ---- public static final String NAME = "Notifications"; ! public NotificationSetNode(EmsBean emsBean) { ! super(new NotificationSetChildren(emsBean)); ! setIconBase("org/mc4j/console/bean/notification/NotificationSetNodeIcon"); ! // Set FeatureDescriptor stuff: setName(NAME); // or, super.setName if needed setDisplayName(java.util.ResourceBundle.getBundle("org/mc4j/console/bean/notification/Bundle").getString("LBL_NotificationSetNode")); setShortDescription(java.util.ResourceBundle.getBundle("org/mc4j/console/bean/notification/Bundle").getString("DESCRIPTION_NotificationSetNode")); ! } Index: NotificationNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/NotificationNode.java,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** NotificationNode.java 5 Oct 2004 05:15:56 -0000 1.12 --- NotificationNode.java 12 Apr 2006 17:28:36 -0000 1.12.2.1 *************** *** 17,44 **** package org.mc4j.console.bean.notification; ! import java.beans.IntrospectionException; ! import java.io.Serializable; ! import java.util.Arrays; ! import java.util.Date; ! import java.util.Vector; ! ! import javax.management.AttributeChangeNotification; ! import javax.management.AttributeChangeNotificationFilter; ! import javax.management.InstanceNotFoundException; ! import javax.management.MBeanNotificationInfo; ! import javax.management.MBeanServer; ! import javax.management.MBeanServerNotification; ! import javax.management.Notification; ! import javax.management.NotificationFilter; ! import javax.management.NotificationListener; ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! import javax.management.ReflectionException; ! import javax.management.relation.MBeanServerNotificationFilter; ! ! import org.openide.ErrorManager; ! import org.openide.actions.CustomizeAction; import org.openide.nodes.AbstractNode; - import org.openide.nodes.BeanNode; import org.openide.nodes.Children; import org.openide.nodes.Node; --- 17,22 ---- package org.mc4j.console.bean.notification; ! import org.mc4j.ems.connection.bean.notification.EmsNotification; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; *************** *** 47,52 **** import org.openide.util.actions.SystemAction; - import org.mc4j.console.bean.notification.tracker.NotificationTracker; - /** * --- 25,28 ---- *************** *** 54,93 **** * @version $Revision$($Author$ / $Date$) */ ! public class NotificationNode extends AbstractNode { ! ! ! protected MBeanServer server; ! protected ObjectInstance objectInstance; ! protected ObjectName objectName; ! protected MBeanNotificationInfo notificationInfo; ! protected NotificationListener listener; - /** - * @deprecated Just pass object name - * @param server - * @param objectInstance - * @param notificationInfo - */ - public NotificationNode(MBeanServer server, ObjectInstance objectInstance, MBeanNotificationInfo notificationInfo) { - this(server, objectInstance.getObjectName(), notificationInfo); - } ! public NotificationNode(MBeanServer server, ObjectName objectName, MBeanNotificationInfo notificationInfo) { super(new Children.Array()); ! ! this.server = server; ! this.notificationInfo = notificationInfo; ! this.objectName = objectName; ! ! setIconBase("org/mc4j/console/bean/notification/NotificationNodeNLIcon"); ! // Whatever is most relevant to a user: ! setDefaultAction(SystemAction.get(CustomizeAction.class)); ! // Set FeatureDescriptor stuff: ! setName(this.notificationInfo.getName()); // or, super.setName if needed ! setDisplayName(this.notificationInfo.getName()); //NbBundle.getMessage(NotificationNode.class, "LBL_node")); ! setShortDescription(Arrays.asList(this.notificationInfo.getNotifTypes()).toString()); ! } --- 30,45 ---- * @version $Revision$($Author$ / $Date$) */ ! public class NotificationNode extends AbstractNode implements Comparable { ! protected EmsNotification notification; ! public NotificationNode(EmsNotification notification) { super(new Children.Array()); + this.notification = notification; ! setName(notification.getName()); ! setDisplayName(notification.getName()); ! setShortDescription(notification.getDescription()); } *************** *** 107,110 **** --- 59,69 ---- public void toggleNotification() { + if (!notification.isListening()) + notification.startListening(); + else + notification.stopListening(); + } + + /* if (this.listener == null) { this.listener = new CustomNotificationListener(this); *************** *** 114,122 **** for(int i = 0; i < filters.length; i++) //for every filter available { ! this.server.addNotificationListener( ! this.objectName, ! this.listener, ! filters[i], ! null); } } catch (Exception e) { --- 73,81 ---- for(int i = 0; i < filters.length; i++) //for every filter available { ! this.server.addNotificationListener( ! this.objectName, ! this.listener, ! filters[i], ! null); } } catch (Exception e) { *************** *** 138,141 **** --- 97,101 ---- } } + */ /** *************** *** 147,151 **** * @return array of notification filters */ ! private NotificationFilter[] getNotificationFilters() { NotificationFilter [] result = new NotificationFilter[]{null}; --- 107,111 ---- * @return array of notification filters */ ! /*private NotificationFilter[] getNotificationFilters() { NotificationFilter [] result = new NotificationFilter[]{null}; *************** *** 153,157 **** try { ! Vector raw = new Vector(10); MBeanNotificationInfo [] notifyInfo = (MBeanNotificationInfo[]) server.getMBeanInfo(objectName).getNotifications(); for(int i = 0; i < notifyInfo.length && !uncrecognisedNotifiationFound; i++) --- 113,117 ---- try { ! Vector raw = new Vector(10); MBeanNotificationInfo [] notifyInfo = (MBeanNotificationInfo[]) server.getMBeanInfo(objectName).getNotifications(); for(int i = 0; i < notifyInfo.length && !uncrecognisedNotifiationFound; i++) *************** *** 159,199 **** if(notifyInfo[i].getName().equals(getName())) //fetch notification specific to this node... { ! String [] notifyTypes = notifyInfo[i].getNotifTypes(); ! ! NotificationFilter filter = null; ! for(int j = 0; j < notifyTypes.length && !uncrecognisedNotifiationFound; j++) ! { ! //TODO in the future add more filter support here, if nessesary.... ! if(notifyTypes[j].equals(AttributeChangeNotification.ATTRIBUTE_CHANGE)) ! { ! filter = new AttributeChangeNotificationFilter(); ! ((AttributeChangeNotificationFilter) filter).enableAttribute(getName()); ! } ! else if(notifyTypes[j].equals(MBeanServerNotification.REGISTRATION_NOTIFICATION)) ! { ! filter = new MBeanServerNotificationFilter(); ! ((MBeanServerNotificationFilter) filter).disableAllTypes(); ! ((MBeanServerNotificationFilter) filter).enableType(MBeanServerNotification.REGISTRATION_NOTIFICATION); ! ((MBeanServerNotificationFilter) filter).enableAllObjectNames(); ! } ! else if(notifyTypes[j].equals(MBeanServerNotification.UNREGISTRATION_NOTIFICATION)) ! { ! filter = new MBeanServerNotificationFilter(); ! ((MBeanServerNotificationFilter) filter).disableAllTypes(); ! ((MBeanServerNotificationFilter) filter).enableType(MBeanServerNotification.UNREGISTRATION_NOTIFICATION); ! ((MBeanServerNotificationFilter) filter).enableAllObjectNames(); ! } ! else //unrecognised notification type, set filter to null.... ! { ! filter = null; ! uncrecognisedNotifiationFound = true; //break the loop... ! //once we have a null filter there is no point of ! //having any other filters as all of the notifications will have to be ! //coming through (in other words we don't know how to filer, so dont' filter at all). ! raw.removeAllElements(); ! } ! raw.add(filter); ! } ! } } if(raw.size() > 0) //do we have anything other than a default result? --- 119,159 ---- if(notifyInfo[i].getName().equals(getName())) //fetch notification specific to this node... { ! String [] notifyTypes = notifyInfo[i].getNotifTypes(); ! ! NotificationFilter filter = null; ! for(int j = 0; j < notifyTypes.length && !uncrecognisedNotifiationFound; j++) ! { ! //TODO in the future add more filter support here, if nessesary.... ! if(notifyTypes[j].equals(AttributeChangeNotification.ATTRIBUTE_CHANGE)) ! { ! filter = new AttributeChangeNotificationFilter(); ! ((AttributeChangeNotificationFilter) filter).enableAttribute(getName()); ! } ! else if(notifyTypes[j].equals(MBeanServerNotification.REGISTRATION_NOTIFICATION)) ! { ! filter = new MBeanServerNotificationFilter(); ! ((MBeanServerNotificationFilter) filter).disableAllTypes(); ! ((MBeanServerNotificationFilter) filter).enableType(MBeanServerNotification.REGISTRATION_NOTIFICATION); ! ((MBeanServerNotificationFilter) filter).enableAllObjectNames(); ! } ! else if(notifyTypes[j].equals(MBeanServerNotification.UNREGISTRATION_NOTIFICATION)) ! { ! filter = new MBeanServerNotificationFilter(); ! ((MBeanServerNotificationFilter) filter).disableAllTypes(); ! ((MBeanServerNotificationFilter) filter).enableType(MBeanServerNotification.UNREGISTRATION_NOTIFICATION); ! ((MBeanServerNotificationFilter) filter).enableAllObjectNames(); ! } ! else //unrecognised notification type, set filter to null.... ! { ! filter = null; ! uncrecognisedNotifiationFound = true; //break the loop... ! //once we have a null filter there is no point of ! //having any other filters as all of the notifications will have to be ! //coming through (in other words we don't know how to filer, so dont' filter at all). ! raw.removeAllElements(); ! } ! raw.add(filter); ! } ! } } if(raw.size() > 0) //do we have anything other than a default result? *************** *** 210,223 **** { //DO NOTHING object is not a Notification Broadcaster... ! } catch(InstanceNotFoundException e) { ErrorManager.getDefault().notify(e); ! } ! return result; } ! ! public static class CustomNotificationListener implements NotificationListener, Serializable { private transient NotificationNode notificationNode; --- 170,183 ---- { //DO NOTHING object is not a Notification Broadcaster... ! } catch(InstanceNotFoundException e) { ErrorManager.getDefault().notify(e); ! } ! return result; } ! */ ! /*public static class CustomNotificationListener implements EmsNotificationListener { private transient NotificationNode notificationNode; *************** *** 227,233 **** } ! public void handleNotification(Notification notification, Object obj) { ! //org.openide.windows.IOProvider.getDefault().getStdOut().println( ! // "Handling notification: " + notification); try { Node notifNode = new BeanNode(notification); --- 187,193 ---- } ! public void handleNotification(EmsNotificationEvent notification) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Handling notification: " + notification); try { Node notifNode = new BeanNode(notification); *************** *** 244,251 **** } ! public boolean isListening() { ! return (this.listener != null); } --- 204,211 ---- } ! */ public boolean isListening() { ! return this.notification.isListening(); } *************** *** 254,264 **** protected boolean enable(org.openide.nodes.Node[] nodes) { ! if ((nodes.length == 1) ! && (nodes[0] instanceof NotificationNode) ! && (!((NotificationNode)nodes[0]).isListening())) { ! return true; ! } else { ! return false; ! } } public org.openide.util.HelpCtx getHelpCtx() { --- 214,220 ---- protected boolean enable(org.openide.nodes.Node[] nodes) { ! return (nodes.length == 1) ! && (nodes[0] instanceof NotificationNode) ! && (!((NotificationNode) nodes[0]).isListening()); } public org.openide.util.HelpCtx getHelpCtx() { *************** *** 276,286 **** protected boolean enable(org.openide.nodes.Node[] nodes) { ! if ((nodes.length == 1) ! && (nodes[0] instanceof NotificationNode) ! && (((NotificationNode)nodes[0]).isListening())) { ! return true; ! } else { ! return false; ! } } public org.openide.util.HelpCtx getHelpCtx() { --- 232,238 ---- protected boolean enable(org.openide.nodes.Node[] nodes) { ! return (nodes.length == 1) ! && (nodes[0] instanceof NotificationNode) ! && (((NotificationNode) nodes[0]).isListening()); } public org.openide.util.HelpCtx getHelpCtx() { *************** *** 296,298 **** --- 248,257 ---- + public int compareTo(Object o) { + Node otherNode = (Node) o; + return this.getDisplayName().compareTo(otherNode.getDisplayName()); + } + + + } |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:18
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/connection/wizard Modified Files: Tag: ems_module_separation ClassPathListPanel.java ClassPathListVisualPanel.java ConnectionDescriptor.java ConnectionIterator.java ConnectionVisualPanel.java ServerInstallPanel.java ServerInstallVisualPanel.java Removed Files: Tag: ems_module_separation JBossConnectorChoicePanel.java JBossConnectorChoiceVisualPanel.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: ClassPathListVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ClassPathListVisualPanel.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** ClassPathListVisualPanel.java 5 Oct 2004 05:15:59 -0000 1.7 --- ClassPathListVisualPanel.java 12 Apr 2006 17:28:37 -0000 1.7.2.1 *************** *** 17,32 **** package org.mc4j.console.connection.wizard; ! import java.awt.Dimension; import java.io.File; import java.util.ArrayList; import java.util.List; - import javax.swing.DefaultListModel; - import javax.swing.JFileChooser; - import javax.swing.JPanel; - import javax.swing.filechooser.FileFilter; - - import org.openide.util.NbBundle; - /** * This visual panel lets you manage a list of class path entries --- 17,29 ---- package org.mc4j.console.connection.wizard; ! import org.openide.util.NbBundle; ! ! import javax.swing.*; ! import javax.swing.filechooser.FileFilter; ! import java.awt.*; import java.io.File; import java.util.ArrayList; import java.util.List; /** * This visual panel lets you manage a list of class path entries *************** *** 76,94 **** } ! public void setFileList(List fileList) { ((DefaultListModel)this.jListEntries.getModel()).removeAllElements(); if (fileList != null) { ! for (int i = 0; i < fileList.size(); i++) { ! File file = (File) fileList.get(i); ! ((DefaultListModel)this.jListEntries.getModel()).addElement(file); } } } ! public List getFileList() { ! List results = new ArrayList(); int count = this.jListEntries.getModel().getSize(); for (int i = 0; i < count; i++) { ! results.add(this.jListEntries.getModel().getElementAt(i)); } return results; --- 73,90 ---- } ! public void setFileList(List<File> fileList) { ((DefaultListModel)this.jListEntries.getModel()).removeAllElements(); if (fileList != null) { ! for (File file : fileList) { ! ((DefaultListModel) this.jListEntries.getModel()).addElement(file); } } } ! public List<File> getFileList() { ! List<File> results = new ArrayList<File>(); int count = this.jListEntries.getModel().getSize(); for (int i = 0; i < count; i++) { ! results.add((File) this.jListEntries.getModel().getElementAt(i)); } return results; --- JBossConnectorChoicePanel.java DELETED --- Index: ConnectionIterator.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionIterator.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** ConnectionIterator.java 5 Oct 2004 05:15:59 -0000 1.11 --- ConnectionIterator.java 12 Apr 2006 17:28:37 -0000 1.11.2.1 *************** *** 50,55 **** new ConnectionVisualPanel(this.connectionDescriptor), new ServerInstallPanel(this.connectionDescriptor), ! new ClassPathListPanel(this.connectionDescriptor), ! new JBossConnectorChoicePanel(this.connectionDescriptor) }; } --- 50,54 ---- new ConnectionVisualPanel(this.connectionDescriptor), new ServerInstallPanel(this.connectionDescriptor), ! new ClassPathListPanel(this.connectionDescriptor) }; } *************** *** 61,66 **** "Connect to Server", "Select Server Installation", ! "Customize classpath", ! "Choose connector" }; } --- 60,64 ---- "Connect to Server", "Select Server Installation", ! "Customize classpath" }; } *************** *** 113,119 **** case 2: return true; - case 3: - return false; - //return (ManagementNode.JBOSS_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType())); default: throw new NoSuchElementException (); --- 111,114 ---- Index: ConnectionVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionVisualPanel.java,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** ConnectionVisualPanel.java 15 Jan 2005 03:50:18 -0000 1.20 --- ConnectionVisualPanel.java 12 Apr 2006 17:28:37 -0000 1.20.2.1 *************** *** 17,25 **** package org.mc4j.console.connection.wizard; - import org.mc4j.console.ManagementNode; - import org.mc4j.console.connection.install.ConnectionTypeDescriptor; - import org.mc4j.console.connection.persistence.ConnectionSettings; import org.mc4j.console.connection.wizard.advanced.AdvancedPanel; import org.mc4j.console.swing.ComponentBorder; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; --- 17,25 ---- package org.mc4j.console.connection.wizard; import org.mc4j.console.connection.wizard.advanced.AdvancedPanel; import org.mc4j.console.swing.ComponentBorder; + import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; + import org.mc4j.ems.connection.ConnectionFactory; + import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; *************** *** 32,45 **** import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; ! import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.MalformedURLException; import java.net.URL; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.Map; ! import java.util.Set; ! import java.util.HashMap; /** --- 32,43 ---- import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Dialog; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.MalformedURLException; import java.net.URL; ! import java.util.*; /** *************** *** 61,65 **** private final ConnectionDescriptor connectionDescriptor; ! private Map advancedProperties; --- 59,63 ---- private final ConnectionDescriptor connectionDescriptor; ! private Properties advancedProperties; *************** *** 67,71 **** /** Create the wizard panel and set up some basic properties. */ public ConnectionVisualPanel(ConnectionDescriptor connectionDescriptor) { ! super(new JComboBox(ManagementNode.CONNECTION_DESCRIPTORS), Color.darkGray, 2); initComponents(); --- 65,69 ---- /** Create the wizard panel and set up some basic properties. */ public ConnectionVisualPanel(ConnectionDescriptor connectionDescriptor) { ! super(new JComboBox(new Vector(ConnectionFactory.getConnectionTypes())), Color.darkGray, 2); initComponents(); *************** *** 96,110 **** throw new IllegalStateException(mfue.toString()); } - - - } - - private static Object[] getConnectionTypeNames() { - Object[] names = new Object[ManagementNode.CONNECTION_DESCRIPTORS.length]; - for (int i = 0; i < ManagementNode.CONNECTION_DESCRIPTORS.length; i++) { - ConnectionTypeDescriptor descriptor = ManagementNode.CONNECTION_DESCRIPTORS[i]; - names[i] = descriptor.getDisplayName(); - } - return names; } --- 94,97 ---- *************** *** 118,122 **** dMessage = null; ! Map dAdvancedProperties = null; dName = ""; // Everyone needs a name --- 105,109 ---- dMessage = null; ! Properties dAdvancedProperties = null; dName = ""; // Everyone needs a name *************** *** 155,159 **** if (dAdvancedProperties != null) { ! this.advancedProperties = new HashMap(dAdvancedProperties); } } --- 142,146 ---- if (dAdvancedProperties != null) { ! this.advancedProperties = dAdvancedProperties; } } *************** *** 170,174 **** settings.setCredentials(this.credentialsField.getText()); settings.setAdvancedProperties(this.advancedProperties); - settings.setAdvancedProperties(this.advancedProperties); } --- 157,160 ---- Index: ServerInstallVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallVisualPanel.java,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** ServerInstallVisualPanel.java 15 Jan 2005 03:50:18 -0000 1.9 --- ServerInstallVisualPanel.java 12 Apr 2006 17:28:37 -0000 1.9.2.1 *************** *** 29,34 **** import java.awt.event.ActionListener; import java.io.File; - import java.util.Iterator; - import java.util.Set; /** --- 29,32 ---- *************** *** 96,103 **** serverInstallList.getSelectionModel().addListSelectionListener(this); ! Set installs = ServerInstallSetDatabase.getNodes(); ! for (Iterator iterator = installs.iterator(); iterator.hasNext();) { ! ServerInstallInfo serverInstallSettings = (ServerInstallInfo) iterator.next(); ! serverInstallModel.addElement(serverInstallSettings); } --- 94,98 ---- serverInstallList.getSelectionModel().addListSelectionListener(this); ! for (ServerInstallInfo serverInstallSettings : ServerInstallSetDatabase.getNodes()) { serverInstallModel.addElement(serverInstallSettings); } Index: ServerInstallPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallPanel.java,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -C2 -d -r1.13 -r1.13.2.1 *** ServerInstallPanel.java 14 Mar 2005 15:16:17 -0000 1.13 --- ServerInstallPanel.java 12 Apr 2006 17:28:37 -0000 1.13.2.1 *************** *** 130,134 **** return; ! List fileList = new ArrayList(); String[] serverFiles = descriptor.getSettings().getConnectionType().getConnectionClasspathEntries(); --- 130,134 ---- return; ! List<File> fileList = new ArrayList(); String[] serverFiles = descriptor.getSettings().getConnectionType().getConnectionClasspathEntries(); *************** *** 169,173 **** } ! this.descriptor.getSettings().setClassPathEntries((File[]) fileList.toArray((new File[fileList.size()]))); System.out.println("Saving " + settings.hashCode()); } --- 169,173 ---- } ! this.descriptor.getSettings().setClassPathEntries(fileList); System.out.println("Saving " + settings.hashCode()); } Index: ConnectionDescriptor.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionDescriptor.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** ConnectionDescriptor.java 5 Oct 2004 05:15:59 -0000 1.11 --- ConnectionDescriptor.java 12 Apr 2006 17:28:37 -0000 1.11.2.1 *************** *** 17,29 **** package org.mc4j.console.connection.wizard; ! import java.awt.Dimension; ! import java.awt.Toolkit; ! import java.net.MalformedURLException; ! import java.net.URL; ! import org.openide.WizardDescriptor; import org.openide.util.NbBundle; ! import org.mc4j.console.connection.persistence.ConnectionSettings; /** --- 17,27 ---- package org.mc4j.console.connection.wizard; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.WizardDescriptor; import org.openide.util.NbBundle; ! import java.awt.*; ! import java.net.MalformedURLException; ! import java.net.URL; /** Index: ClassPathListPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ClassPathListPanel.java,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** ClassPathListPanel.java 5 Oct 2004 05:15:59 -0000 1.6 --- ClassPathListPanel.java 12 Apr 2006 17:28:37 -0000 1.6.2.1 *************** *** 17,31 **** package org.mc4j.console.connection.wizard; ! import java.awt.Component; ! import java.io.File; ! import java.util.Arrays; ! import java.util.List; ! ! import javax.swing.event.ChangeListener; ! import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; ! import org.mc4j.console.ManagementNode; /** --- 17,28 ---- package org.mc4j.console.connection.wizard; ! import org.mc4j.console.ManagementNode; import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; ! import javax.swing.event.ChangeListener; ! import java.awt.*; ! import java.io.File; ! import java.util.List; /** *************** *** 123,128 **** System.out.println("Reading " + settings.hashCode()); if (descriptor.getSettings().getClassPathEntries() != null) { ! List fileList = Arrays.asList(descriptor.getSettings().getClassPathEntries()); ! ((ClassPathListVisualPanel)getComponent()).setFileList(fileList); } this.installedLibraries = ManagementNode.getExtras(descriptor.getSettings().getConnectionType()); --- 120,124 ---- System.out.println("Reading " + settings.hashCode()); if (descriptor.getSettings().getClassPathEntries() != null) { ! ((ClassPathListVisualPanel)getComponent()).setFileList(descriptor.getSettings().getClassPathEntries()); } this.installedLibraries = ManagementNode.getExtras(descriptor.getSettings().getConnectionType()); *************** *** 130,138 **** public void storeSettings(Object settings) { ! List fileList = component.getFileList(); //System.out.println("Storing the latest libraries"); ! this.descriptor.getSettings().setClassPathEntries((File[]) fileList.toArray(new File[fileList.size()])); ! } --- 126,133 ---- public void storeSettings(Object settings) { ! List<File> fileList = component.getFileList(); //System.out.println("Storing the latest libraries"); ! this.descriptor.getSettings().setClassPathEntries(fileList); } --- JBossConnectorChoiceVisualPanel.java DELETED --- |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/dashboard/components/html Modified Files: Tag: ems_module_separation DashboardHtmlEditorKit.java HtmlDashboardComponent.java MappedObjectView.java Added Files: Tag: ems_module_separation DashboardHtmlTransformer.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: MappedObjectView.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/html/MappedObjectView.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** MappedObjectView.java 14 Mar 2005 16:05:35 -0000 1.2 --- MappedObjectView.java 12 Apr 2006 17:28:37 -0000 1.2.2.1 *************** *** 17,34 **** package org.mc4j.console.dashboard.components.html; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.dashboard.components.AttributeComponent; import javax.swing.*; import javax.swing.text.Element; import javax.swing.text.html.HTML; - import javax.swing.text.html.ObjectView; - import javax.swing.text.html.CSS; import javax.swing.text.html.HTMLDocument; import java.awt.*; import java.util.Map; import java.util.NoSuchElementException; import java.util.StringTokenizer; /** --- 17,34 ---- package org.mc4j.console.dashboard.components.html; ! import org.mc4j.console.Refreshable; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import javax.swing.*; import javax.swing.text.Element; + import javax.swing.text.BadLocationException; import javax.swing.text.html.HTML; import javax.swing.text.html.HTMLDocument; + import javax.swing.text.html.ObjectView; import java.awt.*; import java.util.Map; import java.util.NoSuchElementException; import java.util.StringTokenizer; + import java.io.IOException; /** *************** *** 41,45 **** private Map contextMap; ! public MappedObjectView(Element elem,Map contextMap) { super(elem); this.contextMap = contextMap; --- 41,45 ---- private Map contextMap; ! public MappedObjectView(Element elem, Map contextMap) { super(elem); this.contextMap = contextMap; *************** *** 52,61 **** try { width = Integer.parseInt((String) getElement().getAttributes().getAttribute(HTML.Attribute.WIDTH)); ! } catch(Exception e) {} try { height = Integer.parseInt((String) getElement().getAttributes().getAttribute(HTML.Attribute.HEIGHT)); ! } catch(Exception e) {} ! classId = (String)getElement().getAttributes().getAttribute(HTML.Attribute.CLASSID); // String text = (String) getElement().getAttributes().getAttribute("message"); --- 52,63 ---- try { width = Integer.parseInt((String) getElement().getAttributes().getAttribute(HTML.Attribute.WIDTH)); ! } catch (Exception e) { ! } try { height = Integer.parseInt((String) getElement().getAttributes().getAttribute(HTML.Attribute.HEIGHT)); ! } catch (Exception e) { ! } ! classId = (String) getElement().getAttributes().getAttribute(HTML.Attribute.CLASSID); // String text = (String) getElement().getAttributes().getAttribute("message"); *************** *** 67,90 **** try { // create an attribute pointer? ! StringTokenizer tok = new StringTokenizer(classId,"."); String beanName = (String) tok.nextElement(); String attributeName = (String) tok.nextElement(); ! if (beanName != null && attributeName != null) { ! MBeanNode bean = (MBeanNode) contextMap.get(beanName); if (bean != null) { ! AttributeNode attributeNode = (AttributeNode) bean.getAttributeNodeMap().get(attributeName); ! if (attributeNode != null) { ! AttributeComponent attributeComponent = new AttributeComponent(); ! attributeComponent.setBeanNode(bean); ! attributeComponent.setAttributeName(attributeName); ! attributeComponent.setContext(contextMap); ! attributeComponent.setToolTipText(attributeNode.getShortDescription()); ! contextMap.put(classId,attributeComponent); ! comp = attributeComponent; } } ! } ! } catch (NoSuchElementException nsee) {} } --- 69,96 ---- try { // create an attribute pointer? ! StringTokenizer tok = new StringTokenizer(classId, "."); String beanName = (String) tok.nextElement(); String attributeName = (String) tok.nextElement(); ! /*if (beanName != null && attributeName != null) { ! EmsBean bean = (EmsBean) co ! ntextMap.get(beanName); if (bean != null) { ! EmsAttribute emsAttribute = bean.getAttribute(attributeName); ! if (emsAttribute != null) { ! // AttributeComponent attributeComponent = new AttributeComponent(); ! // attributeComponent.setBean(bean); ! // attributeComponent.setAttributeName(attributeName); ! // attributeComponent.setContext(contextMap); ! // attributeComponent.setToolTipText(emsAttribute.getDescription()); ! // contextMap.put(classId, attributeComponent); ! // comp = attributeComponent; ! comp = new InfoComponent(getElement(),emsAttribute); } } ! }*/ ! comp = new InfoComponent(getElement(), null); ! } catch (NoSuchElementException nsee) { ! } } *************** *** 96,105 **** if (comp instanceof JLabel) { // This seems to set the label text a the inline text baseline ! ((JLabel)comp).setAlignmentY(0.80f);//SwingConstants.TOP); Font inlineFont = ! ((HTMLDocument)getDocument()).getStyleSheet().getFont( ! ((HTMLDocument)getDocument()).getStyleSheet().getViewAttributes(this)); ! ((JLabel)comp).setFont(inlineFont); } --- 102,111 ---- if (comp instanceof JLabel) { // This seems to set the label text a the inline text baseline ! ((JLabel) comp).setAlignmentY(0.80f);//SwingConstants.TOP); Font inlineFont = ! ((HTMLDocument) getDocument()).getStyleSheet().getFont( ! ((HTMLDocument) getDocument()).getStyleSheet().getViewAttributes(this)); ! ((JLabel) comp).setFont(inlineFont); } *************** *** 109,111 **** --- 115,190 ---- return comp; } + + + public static class InfoComponent extends JComponent implements Refreshable { + static long l; + + EmsAttribute attribute; + int existingInfoLength; + Element element; + String key; + + boolean inited = false; + + public InfoComponent(Element element, EmsAttribute attribute) { + if (element.getDocument() instanceof Tester.InfoBackedHtmlDocument) { + Tester.InfoBackedHtmlDocument doc = (Tester.InfoBackedHtmlDocument) element.getDocument(); + doc.register(this); + } + + setSize(1, 1); + setPreferredSize(new Dimension(1,1)); + setMaximumSize(new Dimension(1,1)); + this.attribute = attribute; + this.element = element; + + HTMLDocument doc = (HTMLDocument) element.getDocument(); + + } + + public void refresh() { + Tester.InfoBackedHtmlDocument doc = (Tester.InfoBackedHtmlDocument) element.getDocument(); + + if (!inited) { + try { + long n = l++; + this.key = "_key" + n; + + doc.dump(System.out); + doc.insertBeforeStart(element,"<span id=\"" + key + "\">Loading...</span>"); + doc.dump(System.out); + Thread.sleep(1000); + doc.dump(System.out); + + this.element = doc.getElement("_key" + String.valueOf(n)); + assert(element != null); + } catch (BadLocationException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + inited = true; + } + + try { + // getDocument().remove(start, oldLength); + Object val = "hi";//attribute.refresh(); + String txt = val == null ? "null" : val.toString(); + + + doc.setOuterHTML(element,"<span id=\"" + key + "\">" + "just a test" + " </span>"); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + public Element getElement() { + return element; + } + } + + } \ No newline at end of file Index: HtmlDashboardComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/html/HtmlDashboardComponent.java,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** HtmlDashboardComponent.java 13 Oct 2004 04:59:36 -0000 1.1 --- HtmlDashboardComponent.java 12 Apr 2006 17:28:37 -0000 1.1.2.1 *************** *** 17,26 **** package org.mc4j.console.dashboard.components.html; import org.mc4j.console.dashboard.DashboardComponent; ! import org.openide.modules.InstalledFileLocator; import javax.swing.*; import javax.swing.text.html.HTMLDocument; ! import java.awt.*; import java.io.File; import java.io.IOException; --- 17,36 ---- package org.mc4j.console.dashboard.components.html; + import ognl.OgnlException; + import org.jdesktop.swingx.JXEditorPane; + import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.DashboardComponent; ! import org.mc4j.console.dashboard.context.OgnlHelper; import javax.swing.*; + import javax.swing.text.BadLocationException; + import javax.swing.text.Element; import javax.swing.text.html.HTMLDocument; ! import java.awt.BorderLayout; ! import java.awt.Component; ! import java.awt.Dimension; ! import java.awt.Graphics; ! import java.awt.Graphics2D; ! import java.awt.RenderingHints; import java.io.File; import java.io.IOException; *************** *** 28,31 **** --- 38,42 ---- import java.net.URL; import java.net.URLClassLoader; + import java.util.HashMap; import java.util.Map; *************** *** 40,44 **** --- 51,59 ---- private DashboardHtmlEditorKit editorKit; private String htmlDocumentName; + private String html; + private boolean refreshAttributes; private Map contextMap; + private DashboardHtmlTransformer transformer; + protected void addImpl(Component comp, Object constraints, int index) { *************** *** 52,57 **** public static class AliasedEditorPane extends JEditorPane { protected void paintComponent(Graphics g) { ! ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, ! RenderingHints.VALUE_ANTIALIAS_ON); super.paintComponent(g); } --- 67,72 ---- public static class AliasedEditorPane extends JEditorPane { protected void paintComponent(Graphics g) { ! ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, ! RenderingHints.VALUE_ANTIALIAS_ON); super.paintComponent(g); } *************** *** 59,82 **** private void initComponents() { ! editorPane = new AliasedEditorPane(); editorKit = new DashboardHtmlEditorKit(contextMap); editorPane.setEditorKit(editorKit); editorPane.setEditable(false); ! File dashboardDir = ! InstalledFileLocator.getDefault().locate("dashboards","org.mc4j.console",false); try { ! URLClassLoader cl = new URLClassLoader(new URL[] { dashboardDir.toURL() }); ! InputStream documentStream = cl.getResourceAsStream(htmlDocumentName); ! editorPane.read(documentStream,(HTMLDocument) editorKit.createDefaultDocument()); } catch (IOException e) { e.printStackTrace(); } setLayout(new BorderLayout()); --- 74,109 ---- private void initComponents() { + setMaximumSize(new Dimension(Short.MAX_VALUE, + Short.MAX_VALUE)); ! ! editorPane = new JXEditorPane(); //new AliasedEditorPane(); editorKit = new DashboardHtmlEditorKit(contextMap); editorPane.setEditorKit(editorKit); editorPane.setEditable(false); ! // File dashboardDir = new File("dashboards"); ! //InstalledFileLocator.getDefault().locate("dashboards","org.mc4j.console",false); + File dashboardFile = (File) contextMap.get(Dashboard.CONTEXT_DASHBOARD_FILE); + File dashboardDir = dashboardFile.getParentFile(); try { ! if (htmlDocumentName != null) { ! URLClassLoader cl = new URLClassLoader(new URL[]{dashboardDir.toURL()}); ! InputStream documentStream = cl.getResourceAsStream(htmlDocumentName); ! editorPane.read(documentStream, editorKit.createDefaultDocument()); ! } else if (html != null) { ! transformer = new DashboardHtmlTransformer(); ! html = transformer.transform(html, contextMap); ! editorPane.setText(html); + } } catch (IOException e) { e.printStackTrace(); } + editorPane.setEditable(false); setLayout(new BorderLayout()); *************** *** 86,104 **** } - public String getHtmlDocumentName() { - return htmlDocumentName; - } - public void setHtmlDocumentName(String htmlDocumentName) { this.htmlDocumentName = htmlDocumentName; } public void setContext(Map context) { ! this.contextMap = context; initComponents(); } ! public void refresh() { ! initComponents(); } } --- 113,186 ---- } public void setHtmlDocumentName(String htmlDocumentName) { this.htmlDocumentName = htmlDocumentName; } + public void setHtml(String html) { + this.html = html; + } + public void setContext(Map context) { ! this.contextMap = new HashMap(context); initComponents(); } ! ! ! private Map<String, Element> elements = new HashMap<String, Element>(); ! ! public synchronized void refresh() { ! //initComponents(); ! ! // try { ! // HTMLDocument doc = (HTMLDocument) editorPane.getDocument(); ! // doc. ! // editorPane.getDocument().insertString(editorPane.getDocument().getEndPosition().getOffset(),"\n<P>Add some more lines</P>",null); ! // } catch (BadLocationException e) { ! // e.printStackTrace(); ! // } ! ! if (transformer != null) { ! final HTMLDocument doc = (HTMLDocument) editorPane.getDocument(); ! ! ! ! for (Map.Entry<String, String> entry : transformer.getKeys().entrySet()) { ! ! String displayValue; ! try { ! Object val = OgnlHelper.getValue(entry.getValue(),contextMap, String.class); ! //Ognl.getValue(entry.getValue(), contextMap); ! displayValue = val != null ? val.toString() : "null"; ! } catch (OgnlException e) { ! e.printStackTrace(); ! displayValue = "~unreadable: " + e.getMessage() + "~"; ! } ! try { ! final Element e = doc.getElement(entry.getKey()); ! ! final int p0 = e.getStartOffset(); ! final int p1 = e.getEndOffset(); ! ! final String displayValue1 = displayValue; ! SwingUtilities.invokeAndWait(new Runnable() { ! public void run() { ! try { ! doc.replace(p0, p1 - p0, ! displayValue1, ! e.getAttributes()); ! } catch (BadLocationException e1) { ! e1.printStackTrace(); ! } ! ! } ! }); ! // doc.setOuterHTML(e, "<span id=\"" + entry.getKey() + "\">" + displayValue + "</span>"); ! } catch (Exception e1) { ! e1.printStackTrace(); ! } ! } ! ! } } } Index: DashboardHtmlEditorKit.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/html/DashboardHtmlEditorKit.java,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** DashboardHtmlEditorKit.java 13 Oct 2004 04:59:36 -0000 1.1 --- DashboardHtmlEditorKit.java 12 Apr 2006 17:28:37 -0000 1.1.2.1 *************** *** 19,22 **** --- 19,23 ---- import org.mc4j.console.swing.html.ClassPathImageView; + import javax.swing.*; import javax.swing.text.Element; import javax.swing.text.StyleConstants; *************** *** 25,28 **** --- 26,30 ---- import javax.swing.text.html.HTML; import javax.swing.text.html.HTMLEditorKit; + import javax.swing.text.html.ParagraphView; import java.util.Map; *************** *** 53,68 **** public View create(Element elem) { Object o = ! elem.getAttributes().getAttribute(StyleConstants.NameAttribute); if (o instanceof HTML.Tag) { HTML.Tag kind = (HTML.Tag) o; ! if (kind == HTML.Tag.IMG) { ! return new ClassPathImageView(elem); ! } else if (kind == HTML.Tag.OBJECT) { return new MappedObjectView(elem, contextMap); } } ! return super.create( elem ); } } } --- 55,96 ---- public View create(Element elem) { Object o = ! elem.getAttributes().getAttribute(StyleConstants.NameAttribute); ! if (o instanceof HTML.Tag) { HTML.Tag kind = (HTML.Tag) o; ! if (kind == HTML.Tag.IMG) { ! return new ClassPathImageView(elem); ! } else if (kind == HTML.Tag.OBJECT) { return new MappedObjectView(elem, contextMap); + } else if (kind == HTML.Tag.P || kind == HTML.Tag.IMPLIED) { + return new WordSplittingParagraphView(elem); } } ! return super.create(elem); ! } ! } ! ! ! /** ! * This just allows us to split long words onto multiple lines instead of ! * making the component bigger. ! */ ! private static class WordSplittingParagraphView extends ParagraphView { ! public WordSplittingParagraphView(Element elem) { ! super(elem); ! } ! ! protected SizeRequirements calculateMinorAxisRequirements(int axis, ! SizeRequirements r) { ! SizeRequirements sup = super.calculateMinorAxisRequirements(axis, r); ! // TODO: This is the minumum rendering size (sizes smaller than a displayable character) ! // will cause the renderer to go nuts. Should never size smaler than the largest character in a ! // paragraph ! sup.minimum = 30; ! return sup; } } + + } --- NEW FILE: DashboardHtmlTransformer.java --- /* * Copyright 2002-2005 Greg Hinkle * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mc4j.console.dashboard.components.html; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @author Greg Hinkle (gh...@us...), Dec 21, 2005 * @version $Revision: 1.1.2.1 $($Author: ghinkl $ / $Date: 2006/04/12 17:28:37 $) */ public class DashboardHtmlTransformer { static int n; private Map<String, String> keys = new HashMap<String, String>(); public String transform(String data, Map context) { // Searches for cases of ${foo.bar.baz} as they are property references Pattern pattern = Pattern.compile("\\$\\{([^\\}]*)\\}"); String result = transformForEach(data,context); Matcher m = pattern.matcher(result); while (m.find()) { String identifier = m.group(); identifier = identifier.substring(2,identifier.length()-1); String key = "key" + ++n; result = m.replaceFirst("<span id=\"" + key +"\">loading...</span>"); keys.put(key,identifier); m = pattern.matcher(result); //System.out.println(key + " = " + identifier); } return result; } private String transformForEach(String data, Map context) { Pattern pattern = Pattern.compile("\\#foreach\\(([^\\)]*)\\)(.*)\\#endfor",Pattern.MULTILINE|Pattern.DOTALL); // Pattern pattern = Pattern.compile("\\#foreach\\(([^\\)]*)\\)(.*)\\#endfor", Pattern.MULTILINE|Pattern.DOTALL); Matcher m = pattern.matcher(data); while (m.find()) { StringBuffer allRows = new StringBuffer(); String variableAssignment = m.group(1); String content = m.group(2); String[] vars =variableAssignment.split("\\:"); String key = vars[0].trim(); String contextKey = vars[1].trim(); Collection c; try { contextKey = Pattern.compile("\\$\\{(.*)\\}").matcher(contextKey).replaceAll("$1"); Object val = ognl.Ognl.getValue(contextKey,context); if (val.getClass().isArray()) { c = Arrays.asList((Object[]) val); } else { c = (Collection) val; } } catch (Exception e) { c = Collections.EMPTY_LIST; } key = key.replace("$","\\$"); Pattern p = Pattern.compile(key); //("\\$\\{(.*)(" + key + ")(.*)\\}"); for (Object row : c) { allRows.append(p.matcher(content).replaceAll(row.toString())); //("\\${$1"+row.toString()+"$3}")); } data = data.substring(0,m.start()) + allRows.toString() + data.substring(m.end(),data.length()); m = pattern.matcher(data); } return data; } public Map<String, String> getKeys() { return Collections.unmodifiableMap(keys); } public static void main3(String[] args) { String[] foo = new String[] { "a","b"}; Object bar = foo; System.out.println(Arrays.asList((Object[]) bar).size()); } public static void main(String[] args) { String test = "<html> hello, world <p> \n <b>${foo.bar}</b> ${baz} - [${biteme}] $100.50 {cool}\n" + " #foreach($foo : ${bar[\"woa\"]}) \n" + " <b> woa neat</b>\n" + " Cool: ${$foo.bar.baz a.b[\"$foo\"]}\n" + " #endfor\n" + " bah. ${last.one}"; System.out.println("Start:\n"+test); Map ctx = new HashMap(); ctx.put("bar", Arrays.asList(new String[] { "alpha","beta","gamma","delta" })); System.out.println("Transform:\n"+ new DashboardHtmlTransformer().transform(test,ctx)); } public static void main2(String[] args) { Pattern p = Pattern.compile("\\#foreach\\((.*)\\)(.*)\\#endfor",Pattern.MULTILINE|Pattern.DOTALL); Matcher m = p.matcher("fdgh #foreach($a : ${b.c.d}) foo\n bar\n baz\n #endfor dfg "); System.out.println(m.find()); System.out.println(m.group(1)); } } |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/persistence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/connection/persistence Modified Files: Tag: ems_module_separation ConnectionSetDatabase.java ServerInstallSetDatabase.java Removed Files: Tag: ems_module_separation ConnectionSettings.java ConnectionSettingsBeanInfo.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. --- ConnectionSettings.java DELETED --- --- ConnectionSettingsBeanInfo.java DELETED --- Index: ServerInstallSetDatabase.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/persistence/ServerInstallSetDatabase.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** ServerInstallSetDatabase.java 15 Jan 2005 03:49:16 -0000 1.3 --- ServerInstallSetDatabase.java 12 Apr 2006 17:28:37 -0000 1.3.2.1 *************** *** 44,48 **** private final static String DATABASE_FILENAME = "ServerInstalls.db"; ! private static Set descriptors = Collections.synchronizedSet(new HashSet()); public synchronized static boolean addNode(ServerInstallInfo descriptor) { --- 44,48 ---- private final static String DATABASE_FILENAME = "ServerInstalls.db"; ! private static Set<ServerInstallInfo> descriptors = Collections.synchronizedSet(new HashSet()); public synchronized static boolean addNode(ServerInstallInfo descriptor) { *************** *** 64,71 **** int size = ServerInstallSetDatabase.descriptors.size(); outStream.writeInt( size ); ! Iterator iter = descriptors.iterator(); ! while (iter.hasNext()) { ! ServerInstallInfo element = (ServerInstallInfo)iter.next(); ! outStream.writeObject( element ); } } --- 64,69 ---- int size = ServerInstallSetDatabase.descriptors.size(); outStream.writeInt( size ); ! for (ServerInstallInfo element : descriptors) { ! outStream.writeObject(element); } } *************** *** 124,128 **** } ! public synchronized static Set getNodes() { if (ServerInstallSetDatabase.descriptors.isEmpty()) { loadNodes(); --- 122,126 ---- } ! public synchronized static Set<ServerInstallInfo> getNodes() { if (ServerInstallSetDatabase.descriptors.isEmpty()) { loadNodes(); Index: ConnectionSetDatabase.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/persistence/ConnectionSetDatabase.java,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** ConnectionSetDatabase.java 15 Jan 2005 03:49:16 -0000 1.14 --- ConnectionSetDatabase.java 12 Apr 2006 17:28:37 -0000 1.14.2.1 *************** *** 18,22 **** ! import java.io.EOFException; import java.io.File; import java.io.FileInputStream; --- 18,27 ---- ! import org.mc4j.ems.connection.settings.ConnectionSettings; ! import org.openide.ErrorManager; ! ! import java.beans.XMLDecoder; ! import java.beans.XMLEncoder; ! import java.beans.DefaultPersistenceDelegate; import java.io.File; import java.io.FileInputStream; *************** *** 24,40 **** import java.io.FileOutputStream; import java.io.IOException; - import java.io.InvalidClassException; - import java.io.ObjectInputStream; - import java.io.ObjectOutputStream; - import java.io.StreamCorruptedException; - import java.util.Collections; - import java.util.HashSet; - import java.util.Iterator; import java.util.Set; ! ! import org.openide.ErrorManager; ! import org.openide.windows.IOProvider; /** * @author Corby Page 09.07.02 * @author Greg Hinkle (gh...@us...), December 2002 --- 29,41 ---- import java.io.FileOutputStream; import java.io.IOException; import java.util.Set; ! import java.util.SortedSet; ! import java.util.TreeSet; /** + * TODO GH: Maybe just translate this to util.prefs storage... + * it would be nice not to lose connections this on upgrade + * + * * @author Corby Page 09.07.02 * @author Greg Hinkle (gh...@us...), December 2002 *************** *** 43,178 **** public class ConnectionSetDatabase { ! private final static String DATABASE_FILENAME = "ConnectionNodes.db"; ! private static Set descriptors = Collections.synchronizedSet(new HashSet()); - public synchronized static boolean addNode(ConnectionSettings descriptor) { - ObjectOutputStream outStream = null; - ConnectionSetDatabase.descriptors.remove(descriptor); - ConnectionSetDatabase.descriptors.add(descriptor); - try { - if (getDatabaseFile() == null) { - File file = new File(DATABASE_FILENAME); - file.createNewFile(); - } - outStream = - new ObjectOutputStream( - new FileOutputStream( - getDatabaseFile())); - int size = ConnectionSetDatabase.descriptors.size(); - outStream.writeInt( size ); - Iterator iter = descriptors.iterator(); - while (iter.hasNext()) { - ConnectionSettings element = (ConnectionSettings)iter.next(); - outStream.writeObject( element ); - } - } - catch( Exception ex ) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Caught exception " + ex + " when adding node" ); ! ErrorManager.getDefault().notify(ex); ! ConnectionSetDatabase.descriptors.remove( descriptor ); ! } ! finally { ! try { ! outStream.close(); ! } ! catch( IOException ioEx ) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Could not close outputStream" ); ! } ! } - return true; } ! public synchronized static void removeNode(ConnectionSettings descriptor) { ! ObjectOutputStream outStream = null; ! ConnectionSetDatabase.descriptors.remove( descriptor ); try { - outStream = - new ObjectOutputStream( - new FileOutputStream( - getDatabaseFile())); ! int size = ConnectionSetDatabase.descriptors.size(); ! outStream.writeInt( size ); ! Iterator iter = descriptors.iterator(); ! while (iter.hasNext()) { ! ConnectionSettings element = (ConnectionSettings)iter.next(); ! outStream.writeObject( element ); ! } ! } catch( Exception ex ) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Caught exception " + ex + " when removing node" ); ! ConnectionSetDatabase.descriptors.add( descriptor ); } finally { try { ! outStream.close(); ! } catch( IOException ioEx ) { org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Could not close outputStream" ); } } } - public synchronized static Set getNodes() { - if (ConnectionSetDatabase.descriptors.isEmpty()) { - loadNodes(); - } - Set nodes = new HashSet(); - nodes.addAll(ConnectionSetDatabase.descriptors); - return nodes; //(new HashSet()).addAll(ConnectionSetDatabase.descriptors); - } protected synchronized static void loadNodes() { - ObjectInputStream inStream = null; ! //IOProvider.getDefault().getStdOut().println("Loading connections"); ! ConnectionSetDatabase.descriptors.clear(); ! try { ! inStream = ! new ObjectInputStream( ! new FileInputStream( ! getDatabaseFile())); ! //IOProvider.getDefault().getStdOut().println("Reading connections"); ! int size = inStream.readInt(); ! for ( int i=0; i<size; i++ ) { ! try { ! Object value = inStream.readObject(); ! ConnectionSettings setting = (ConnectionSettings) value; ! descriptors.add(setting); ! } catch (StreamCorruptedException sce) { ! // Ignore. We'll throw this away later... ! } catch (InvalidClassException ice) { ! // old version of class.. fur-get-about-it ! } catch(ClassCastException cce) { ! IOProvider.getDefault().getStdOut().println( ! "Unable to load old connection information."); ! } ! } ! } catch( FileNotFoundException ex ) { ! IOProvider.getDefault().getStdOut().println( ! "Node file missing: " + ex); ! ErrorManager.getDefault().notify(ex); ! } catch (EOFException eofe) { ! // Happens when there are no connections... its cool ! } catch( Exception ex ) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Caught exception " + ex + " when getting nodes" ); ! ErrorManager.getDefault().notify(ex); } finally { try { ! if ( inStream != null ) { ! inStream.close(); } } --- 44,123 ---- public class ConnectionSetDatabase { ! private final static String DATABASE_FILENAME = "ConnectionNodes.xml"; ! private static SortedSet<ConnectionSettings> descriptors = ! new TreeSet<ConnectionSettings>(); ! public synchronized static boolean addNode(ConnectionSettings descriptor) { ! boolean found = descriptors.add(descriptor); ! saveNodes(); ! return found; ! } ! public synchronized static void removeNode(ConnectionSettings descriptor) { ! descriptors.remove(descriptor); ! saveNodes(); } ! public synchronized static Set getNodes() { ! if (ConnectionSetDatabase.descriptors.isEmpty()) { ! loadNodes(); ! } ! return new TreeSet(ConnectionSetDatabase.descriptors); ! } ! protected synchronized static void saveNodes() { + FileOutputStream fos= null; try { ! fos = new FileOutputStream(getDatabaseFile(), false); ! XMLEncoder encoder = new XMLEncoder(fos); ! encoder.setPersistenceDelegate( ! File.class, ! new DefaultPersistenceDelegate(new String[] { "absolutePath" })); ! ! ! encoder.writeObject(descriptors); ! ! encoder.close(); ! } catch (FileNotFoundException e) { ! e.printStackTrace(); } finally { try { ! if ( fos != null ) { ! fos.close(); ! } ! } ! catch( IOException ioEx ) { org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Could not close inputStream" ); } } } protected synchronized static void loadNodes() { ! FileInputStream fis = null; ! try { ! fis = new FileInputStream(getDatabaseFile()); ! XMLDecoder decoder = new XMLDecoder(fis); ! ConnectionSetDatabase.descriptors.clear(); ! descriptors = (SortedSet<ConnectionSettings>) decoder.readObject(); ! ! } catch (FileNotFoundException e) { ! e.printStackTrace(); } finally { try { ! if ( fis != null ) { ! fis.close(); } } *************** *** 207,209 **** --- 152,156 ---- return connectionsFile; } + + } \ No newline at end of file |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:18
|
Update of /cvsroot/mc4j/mc4j/application/branding/bundle/org/netbeans/core/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/application/branding/bundle/org/netbeans/core/startup Added Files: Tag: ems_module_separation Bundle_mc4j.properties frame48_mc4j.gif splash_mc4j.gif Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. --- NEW FILE: Bundle_mc4j.properties --- currentVersion=MC4J Management Console {0} SPLASH_HEIGHT=338 SPLASH_WIDTH=450 SplashProgressBarBounds=40,289,370,3 # 0,267,397,6 SplashProgressBarColor=0xB0B0B0 SplashRunningTextBounds=42,269,371,19 # 225,252,172,10 SplashRunningTextColor=0xB0B0B0 SplashRunningTextFontSize=12 --- NEW FILE: frame48_mc4j.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: splash_mc4j.gif --- (This appears to be a binary file; contents omitted.) |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:18
|
Update of /cvsroot/mc4j/mc4j/application/dashboards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/application/dashboards Modified Files: Tag: ems_module_separation BasicMBean.xml Dashboard_1_0.dtd HtmlDocumentTest.html HtmlDocumentTest.xml RelationsGraph.xml RelationsGraph2.xml Added Files: Tag: ems_module_separation Dashboard_2_0.dtd Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: BasicMBean.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/BasicMBean.xml,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** BasicMBean.xml 5 Oct 2004 04:01:08 -0000 1.10 --- BasicMBean.xml 12 Apr 2006 17:28:34 -0000 1.10.2.1 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "EmsAttribute-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 10,107 **** --> ! <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> ! <!-- *** The header section displays title and a refresh control *** --> ! <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="(Message)General information about {ObjectName}"/> ! <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> ! <!-- *** The main content is displayed within a scrollpane for easy viewing *** --> ! <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> ! <!-- *** A Section holder is an included component for providing hide-able parts *** --> ! <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> ! ! <!-- *** This component displays the attributes of an MBean *** --> ! <Component type="org.mc4j.console.dashboard.components.AttributeTreeTableExplorer"> ! <!-- *** Notice were setting the node that we matched above by name here *** --> ! <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> --- 10,54 ---- --> ! <Dashboard version="2.0" name="Basic MBean View" standardHeader="true" autoRefresh="true" refreshControl="true"> ! <Description>Displays general information about any MBean in the system.</Description> ! <DashboardMatch type="Bean"> ! <BeanMatch id="bean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter=".*"/> ! </BeanMatch> ! </DashboardMatch> ! <LayoutManager type="org.jdesktop.swingx.VerticalLayout"/> ! <Content> ! <!-- *** A Section holder is an included component for providing hide-able parts *** --> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'MBean Attributes'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Content> ! <!-- *** This component displays the attributes of an MBean *** --> ! <Component type="org.mc4j.console.dashboard.components.AttributeListComponent"> ! <!-- *** Notice were setting the node that we matched above by name here *** --> ! <Attribute name="bean" value="#bean"/> ! <Constraint type="BorderConstraints" direction="CENTER"/> ! <Border type="javax.swing.border.LineBorder" color="'0x444444'" thickness="1"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! </Component> ! </Content> ! </Component> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'MBean Operations'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="bean" value="#bean"/> ! <Attribute name="format" value="@org.mc4j.console.dashboard.components.OperationListComponent@FULL_FORMAT"/> ! </Component> ! </Content> ! </Component> ! </Content> </Dashboard> Index: RelationsGraph.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/RelationsGraph.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** RelationsGraph.xml 8 Apr 2004 15:07:17 -0000 1.4 --- RelationsGraph.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 10,19 **** --> ! <Dashboard version="1.0" name="Relations Graph"> <Description>Displays a graph of the relations in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="RelationServiceBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="name=RelationService"/> </BeanMatch> </DashboardMatch> --- 10,19 ---- --> ! <Dashboard version="2.0" name="Relations Graph"> <Description>Displays a graph of the relations in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="RelationServiceBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="name=RelationService"/> </BeanMatch> </DashboardMatch> --- NEW FILE: Dashboard_2_0.dtd --- <!ELEMENT Dashboard (#PCDATA | DashboardMatch | Description | Context | LayoutManager | Content)*> <!ATTLIST Dashboard version CDATA #REQUIRED> <!ATTLIST Dashboard name CDATA #REQUIRED> <!ATTLIST Dashboard standardHeader CDATA #IMPLIED> <!ATTLIST Dashboard refreshControl CDATA #IMPLIED> <!ATTLIST Dashboard autoRefresh CDATA #IMPLIED> <!ELEMENT DashboardMatch (#PCDATA | BeanMatch)*> <!ATTLIST DashboardMatch type CDATA #REQUIRED> <!ATTLIST DashboardMatch location CDATA #IMPLIED> <!ELEMENT BeanMatch (#PCDATA | Condition)*> <!ATTLIST BeanMatch id CDATA #REQUIRED> <!ATTLIST BeanMatch type CDATA #REQUIRED> <!ELEMENT Condition (#PCDATA)*> <!ATTLIST Condition type CDATA #REQUIRED> <!ATTLIST Condition filter CDATA #IMPLIED> <!ATTLIST Condition attributeName CDATA #IMPLIED> <!ATTLIST Condition value CDATA #IMPLIED> <!ATTLIST Condition serverType CDATA #IMPLIED> <!ELEMENT Context (#PCDATA)> <!ATTLIST Context name CDATA #IMPLIED> <!ATTLIST Context type CDATA #IMPLIED> <!ATTLIST Context value CDATA #IMPLIED> <!ELEMENT Attribute (#PCDATA | Component)*> <!ATTLIST Attribute name CDATA #REQUIRED> <!ATTLIST Attribute value CDATA #IMPLIED> <!ATTLIST Attribute literal CDATA #IMPLIED> <!ELEMENT Description (#PCDATA)> <!ELEMENT Component (#PCDATA | Constraint | LayoutManager | Content | Attribute | Border)*> <!ATTLIST Component id CDATA #IMPLIED> <!ATTLIST Component type CDATA #REQUIRED> <!ELEMENT Constraint (#PCDATA)> <!ATTLIST Constraint anchor CDATA #IMPLIED> <!ATTLIST Constraint gridx CDATA #IMPLIED> <!ATTLIST Constraint gridy CDATA #IMPLIED> <!ATTLIST Constraint widthx CDATA #IMPLIED> <!ATTLIST Constraint weightx CDATA #IMPLIED> <!ATTLIST Constraint weighty CDATA #IMPLIED> <!ATTLIST Constraint fill CDATA #IMPLIED> <!ATTLIST Constraint insets CDATA #IMPLIED> <!ATTLIST Constraint type CDATA #REQUIRED> <!ATTLIST Constraint direction CDATA #IMPLIED> <!ELEMENT LayoutManager (#PCDATA)> <!ATTLIST LayoutManager rows CDATA #IMPLIED> <!ATTLIST LayoutManager cols CDATA #IMPLIED> <!ATTLIST LayoutManager type CDATA #REQUIRED> <!ATTLIST LayoutManager axis CDATA #IMPLIED> <!ELEMENT Content (#PCDATA | Component)*> <!ELEMENT Border (#PCDATA | Attribute)*> <!ATTLIST Border type CDATA #REQUIRED> <!ATTLIST Border color CDATA #IMPLIED> <!ATTLIST Border thickness CDATA #IMPLIED> <!ATTLIST Border top CDATA #IMPLIED> <!ATTLIST Border left CDATA #IMPLIED> <!ATTLIST Border bottom CDATA #IMPLIED> <!ATTLIST Border right CDATA #IMPLIED> Index: HtmlDocumentTest.html =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/HtmlDocumentTest.html,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** HtmlDocumentTest.html 13 Oct 2004 04:52:45 -0000 1.1 --- HtmlDocumentTest.html 12 Apr 2006 17:28:34 -0000 1.1.2.1 *************** *** 4,8 **** <body bgcolor="#CC3388"> ! <h1 style="color: #FF3322">This is a test</h> <p>This document is an example html dashboard for MC4J. It is only a test --- 4,8 ---- <body bgcolor="#CC3388"> ! <h1 style="color: #FF3322">This is a test</h1> <p>This document is an example html dashboard for MC4J. It is only a test Index: HtmlDocumentTest.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/HtmlDocumentTest.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** HtmlDocumentTest.xml 13 Oct 2004 04:52:45 -0000 1.1 --- HtmlDocumentTest.xml 12 Apr 2006 17:28:34 -0000 1.1.2.1 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.org/Dashboard_1_0.dtd"> <!-- *************** *** 10,19 **** --> ! <Dashboard version="1.0" name="Html Document View"> <Description>Uses html to lay out a dashboard.</Description> <DashboardMatch type="Bean"> ! <BeanMatch id="BeanNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter=".*"/> </BeanMatch> </DashboardMatch> --- 10,19 ---- --> ! <Dashboard version="2.0" name="Html Document View"> <Description>Uses html to lay out a dashboard.</Description> <DashboardMatch type="Bean"> ! <BeanMatch id="bean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter=".*"/> </BeanMatch> </DashboardMatch> *************** *** 29,33 **** <Component id="attributeTable" type="org.mc4j.console.dashboard.components.AttributeTreeTableExplorer"> <!-- *** Notice were setting the node that we matched above by name here *** --> ! <Attribute name="beanNode" value="BeanNode"/> <Border type="javax.swing.border.LineBorder" color="(Literal)0x444444" thickness="(Literal)1"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> --- 29,33 ---- <Component id="attributeTable" type="org.mc4j.console.dashboard.components.AttributeTreeTableExplorer"> <!-- *** Notice were setting the node that we matched above by name here *** --> ! <Attribute name="bean" value="bean"/> <Border type="javax.swing.border.LineBorder" color="(Literal)0x444444" thickness="(Literal)1"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> *************** *** 41,44 **** --- 41,68 ---- + <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> + + <Attribute name="html"> + <![CDATA[ + + <h3>This is a test</h3> + + <table> + <tr><td>Hello</td><td>Goodbye</td></tr> + <tr<td>Foobar</td><td>Baz Splat</td></tr> + </table> + <br> + <font color="#FF0000">Emergency</font> + + ]]> + + </Attribute> + + <Content> + + </Content> + + </Component> + </Content> </Dashboard> Index: RelationsGraph2.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/RelationsGraph2.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** RelationsGraph2.xml 8 Apr 2004 15:07:17 -0000 1.4 --- RelationsGraph2.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 10,19 **** --> ! <Dashboard version="1.0" name="Relations Graph2" > <Description>Displays a graph of the relations in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="RelationServiceBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="name=RelationService"/> </BeanMatch> </DashboardMatch> --- 10,19 ---- --> ! <Dashboard version="2.0" name="Relations Graph2" > <Description>Displays a graph of the relations in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="RelationServiceBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="name=RelationService"/> </BeanMatch> </DashboardMatch> Index: Dashboard_1_0.dtd =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/Dashboard_1_0.dtd,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Dashboard_1_0.dtd 13 Apr 2004 19:38:29 -0000 1.3 --- Dashboard_1_0.dtd 12 Apr 2006 17:28:34 -0000 1.3.2.1 *************** *** 3,6 **** --- 3,8 ---- <!ATTLIST Dashboard name CDATA #REQUIRED> + <!ENTITY StandardHeader SYSTEM "StandardHeader.xml"> + <!ELEMENT DashboardMatch (#PCDATA | BeanMatch)*> <!ATTLIST DashboardMatch type CDATA #REQUIRED> |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:18
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/execution In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/bean/operation/execution Modified Files: Tag: ems_module_separation ExecutionNode.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: ExecutionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/execution/ExecutionNode.java,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** ExecutionNode.java 5 Oct 2004 05:15:56 -0000 1.9 --- ExecutionNode.java 12 Apr 2006 17:28:36 -0000 1.9.2.1 *************** *** 17,39 **** package org.mc4j.console.bean.operation.execution; ! import java.util.HashMap; ! import java.util.Map; ! ! import javax.management.MBeanOperationInfo; ! import javax.management.MBeanParameterInfo; ! import org.openide.ErrorManager; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.AbstractNode; ! import org.openide.nodes.Children; ! import org.openide.nodes.Node; ! import org.openide.nodes.PropertySupport; ! import org.openide.nodes.Sheet; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; ! import org.mc4j.console.bean.MBeanNode; /** --- 17,34 ---- package org.mc4j.console.bean.operation.execution; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; ! import org.mc4j.ems.connection.bean.parameter.EmsParameter; import org.openide.ErrorManager; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.*; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; ! import java.util.HashMap; ! import java.util.List; ! import java.util.Map; /** *************** *** 45,70 **** public class ExecutionNode extends AbstractNode { ! private MBeanOperationInfo operationInfo; private Map parameterValues; ! public ExecutionNode(MBeanOperationInfo operationInfo) { super(Children.LEAF); ! this.operationInfo = operationInfo; this.parameterValues = new HashMap(); setIconBase("org/mc4j/console/bean/operation/execution/ExecutionNodeIcon"); // Set FeatureDescriptor stuff: ! setName(this.operationInfo.getName()); // or, super.setName if needed setDisplayName(NbBundle.getMessage(ExecutionNode.class, "LBL_node")); setShortDescription(NbBundle.getMessage(ExecutionNode.class, "HINT_node")); - // Add cookies, e.g.: - /* - getCookieSet().add(new OpenCookie() { - public void open() { - // Open something useful... - } - }); - */ } --- 40,57 ---- public class ExecutionNode extends AbstractNode { ! private EmsOperation operation; private Map parameterValues; ! public ExecutionNode(EmsOperation operation) { super(Children.LEAF); ! this.operation = operation; this.parameterValues = new HashMap(); setIconBase("org/mc4j/console/bean/operation/execution/ExecutionNodeIcon"); // Set FeatureDescriptor stuff: ! setName(this.operation.getName()); // or, super.setName if needed setDisplayName(NbBundle.getMessage(ExecutionNode.class, "LBL_node")); setShortDescription(NbBundle.getMessage(ExecutionNode.class, "HINT_node")); } *************** *** 72,85 **** protected SystemAction[] createActions() { return new SystemAction[] { - // SystemAction.get(MyFavoriteAction.class), - // null, // separator - /* according to what it can do: - SystemAction.get(CutAction.class), - SystemAction.get(CopyAction.class), - null, - SystemAction.get(DeleteAction.class), - SystemAction.get(RenameAction.class), - null, - */ SystemAction.get(ToolsAction.class), null, --- 59,62 ---- *************** *** 90,106 **** public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; - // When you have help, change to: - // return new HelpCtx(ExecutionNode.class); } - // RECOMMENDED - handle cloning specially (so as not to invoke the overhead of FilterNode): - /* - public Node cloneNode() { - // Try to pass in similar constructor params to what you originally got: - return new ExecutionNode(); - } - */ - - // Create a property sheet: //protected Sheet createSheet() { --- 67,72 ---- *************** *** 111,123 **** //sheet.put(props); return new Node.PropertySet[] { props }; - // - // - // sheet.get(Sheet.PROPERTIES); // get by name, not display name - // if (props == null) { - // props = Sheet.createPropertiesSet(); - // sheet.put(props); - // } - // props.put(new MyProp(someParams)); - // return sheet; } --- 77,80 ---- *************** *** 130,160 **** //org.openide.windows.IOProvider.getDefault().getStdOut().println("Building params for: " + this.operationInfo.getName()); ! MBeanParameterInfo[] params = this.operationInfo.getSignature(); ! for (int i = 0; i < params.length; i++) { ! final MBeanParameterInfo parameterInfo = params[i]; - Class type = null; ! try { ! type = MBeanNode.findType( ! parameterInfo.getType()); ! } catch (Exception e) { ! ErrorManager.getDefault().notify(e); } final Class type2 = type; ! //org.openide.windows.IOProvider.getDefault().getStdOut().println("\t type is: " + type); props.put( new PropertySupport.ReadWrite( ! parameterInfo.getName(), type, ! parameterInfo.getName(), ! parameterInfo.getDescription()) { public Object getValue() { ! ! Object value = parameterValues.get(parameterInfo.getName()); // Specially handle booleans by defualting them to null if ((type2.equals(Boolean.TYPE)) --- 87,115 ---- //org.openide.windows.IOProvider.getDefault().getStdOut().println("Building params for: " + this.operationInfo.getName()); ! List<EmsParameter> params = this.operation.getParameters(); ! for (final EmsParameter parameter : params) { Class type = null; ! try { ! type = MBeanNode.findType( ! parameter.getType()); ! } catch (Exception e) { ! ErrorManager.getDefault().notify(e); } final Class type2 = type; ! //org.openide.windows.IOProvider.getDefault().getStdOut().println("\t type is: " + type); props.put( new PropertySupport.ReadWrite( ! parameter.getName(), type, ! parameter.getName(), ! parameter.getDescription()) { public Object getValue() { ! ! Object value = parameterValues.get(parameter.getName()); // Specially handle booleans by defualting them to null if ((type2.equals(Boolean.TYPE)) *************** *** 166,170 **** public void setValue(Object value) { ! parameterValues.put(parameterInfo.getName(), value); } }); --- 121,125 ---- public void setValue(Object value) { ! parameterValues.put(parameter.getName(), value); } }); |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:17
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/geronimo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/application/dashboards/geronimo Modified Files: Tag: ems_module_separation Geronimo_ServerInfo.html Geronimo_ServerInfo.xml Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: Geronimo_ServerInfo.html =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/geronimo/Geronimo_ServerInfo.html,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** Geronimo_ServerInfo.html 13 Oct 2004 04:52:45 -0000 1.1 --- Geronimo_ServerInfo.html 12 Apr 2006 17:28:34 -0000 1.1.2.1 *************** *** 1,4 **** --- 1,9 ---- <html> + <head> + <style type="text/css"> + + </style> + </head> <body style="margin: 0px"> Index: Geronimo_ServerInfo.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/geronimo/Geronimo_ServerInfo.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** Geronimo_ServerInfo.xml 13 Oct 2004 04:52:45 -0000 1.1 --- Geronimo_ServerInfo.xml 12 Apr 2006 17:28:34 -0000 1.1.2.1 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 7,11 **** --> ! <Dashboard version="1.0" name="Geronimo Server Info"> <Description>This dashboard displays basic information relating to the overall execution of a Geronimo server.</Description> --- 7,11 ---- --> ! <Dashboard version="2.0" name="Geronimo Server Info" standardHeader="true" refreshControl="true"> <Description>This dashboard displays basic information relating to the overall execution of a Geronimo server.</Description> *************** *** 15,19 **** <BeanMatch id="GeronimoJ2EEServer" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="j2eeType=J2EEServer"/> </BeanMatch> --- 15,19 ---- <BeanMatch id="GeronimoJ2EEServer" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="j2eeType=J2EEServer"/> </BeanMatch> *************** *** 21,30 **** <BeanMatch id="JVM" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="j2eeType=JVM"/> </BeanMatch> <BeanMatch id="GeronimoSystemInfo" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="geronimo.system:role=ServerInfo"/> </BeanMatch> --- 21,30 ---- <BeanMatch id="JVM" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="j2eeType=JVM"/> </BeanMatch> <BeanMatch id="GeronimoSystemInfo" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="geronimo.system:role=ServerInfo"/> </BeanMatch> |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:16
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/advanced In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/connection/wizard/advanced Modified Files: Tag: ems_module_separation AdvancedPanel.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: AdvancedPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/advanced/AdvancedPanel.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** AdvancedPanel.java 5 Oct 2004 05:15:59 -0000 1.2 --- AdvancedPanel.java 12 Apr 2006 17:28:37 -0000 1.2.2.1 *************** *** 17,27 **** package org.mc4j.console.connection.wizard.advanced; ! import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Vector; - import javax.swing.table.DefaultTableModel; - --- 17,26 ---- package org.mc4j.console.connection.wizard.advanced; ! import javax.swing.table.DefaultTableModel; import java.util.Iterator; import java.util.Map; + import java.util.Properties; import java.util.Vector; *************** *** 53,62 **** } ! public Map getProperties() { ! Map properties = new HashMap(); DefaultTableModel model = (DefaultTableModel) this.propertyTable.getModel(); Vector data = model.getDataVector(); ! for (Iterator iterator = data.iterator(); iterator.hasNext();) { ! Vector vector = (Vector) iterator.next(); String key = (String) vector.get(0); String value = (String) vector.get(0); --- 52,61 ---- } ! public Properties getProperties() { ! Properties properties = new Properties(); DefaultTableModel model = (DefaultTableModel) this.propertyTable.getModel(); Vector data = model.getDataVector(); ! for (Object aData : data) { ! Vector vector = (Vector) aData; String key = (String) vector.get(0); String value = (String) vector.get(0); |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:16
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/jre15 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/application/dashboards/jre15 Modified Files: Tag: ems_module_separation JRE15_Deadlock.xml JRE15_MemoryUsagePools_PieChart.xml JRE15_MemoryUsage_AllPools.xml JRE15_MemoryUsage_AreaChart.xml JRE15_MemoryUsage_Graph.xml JRE15_MemoryUsage_LineChart.xml JRE15_ThreadTree.xml Added Files: Tag: ems_module_separation JRE15_GarbageCollector.xml JRE15_SystemInfo.xml JRE15_ThreadInfo.xml Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. --- NEW FILE: JRE15_GarbageCollector.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <Dashboard version="2.0" name="Garbage Collectors" standardHeader="true" autoRefresh="true" refreshControl="true"> <Description>Garbage collector information.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> <BeanMatch id="garbageCollectors" type="Multiple"> <Condition type="BeanObjectNameRegexCondition" filter="type=GarbageCollector"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <!--<Component type="org.mc4j.console.dashboard.components.TabularDataComponent"> <Attribute name="bean" value="gcBean"/> <Attribute name="attributeName" value="'LastGcInfo'"/> </Component>--> <Component type="org.mc4j.console.dashboard.components.ForEachPanelComponent"> <Attribute name="beanList" value="#garbageCollectors"/> <Attribute name="IdKey" value="'collector'"/> <LayoutManager type="java.awt.BoxLayout" axis="Y_AXIS"/> <Content> <Component type="org.mc4j.console.swing.SectionHolder"> <Attribute name="title" value="#collector.name"/> <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> <Attribute name="html"> <![CDATA[ <html> <h1>Garbage Collector: ${collector["Name"]}</h1> <b>Collections:</b> ${collector["CollectionCount"]}<br> <b>Total Collection Time:</b> ${collector["CollectionTime"]}<br> <b>Collections:</b> ${collector["CollectionCount"]}<br> <b>Last Collection:</b><br> <blockquote> <b>Duration:</b> ${collector["LastGcInfo"]["endTime"] - collector["LastGcInfo"]["startTime"]}<br> <b>Id:</b> ${collector["LastGcInfo"]["id"]}<br> #foreach($pool : ${collector["MemoryPoolNames"]}) <blockquote> <b>${collector["LastGcInfo"].memoryUsageAfterGc["$pool"].key}</b><br> Usage Delta: ${(collector["LastGcInfo"].memoryUsageAfterGc["$pool"].value.used - collector["LastGcInfo"].memoryUsageBeforeGc["$pool"].value.used) / 1024} KB </blockquote> #endfor </blockquote> </html> ]]> </Attribute> </Component> </Content> </Component> </Content> </Component> </Content> </Dashboard> Index: JRE15_MemoryUsage_AllPools.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsage_AllPools.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** JRE15_MemoryUsage_AllPools.xml 8 May 2004 03:55:34 -0000 1.1 --- JRE15_MemoryUsage_AllPools.xml 12 Apr 2006 17:28:34 -0000 1.1.2.1 *************** *** 1,97 **** <?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="All Memory Pool Graphs"> ! ! <Description>Memory usage graph for all JRE 1.5 Memory Pools.</Description> ! ! <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="MemoryPoolList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> ! </BeanMatch> ! </DashboardMatch> ! ! <LayoutManager type="java.awt.BorderLayout"/> ! <Content> ! ! <!-- *** The header section displays title and a refresh control *** --> ! <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> ! </Content> ! </Component> ! ! <!-- *** Scroll pane of info *** --> ! <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.ForEachPanelComponent"> ! <Attribute name="BeanList" value="MemoryPoolList"/> ! <Attribute name="IdKey" value="(Literal)beanNode"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="preferredSize" value="100,100"/> ! <LayoutManager type="java.awt.BoxLayout" axis="Y_AXIS"/> ! <Content> - <Component type="org.mc4j.console.swing.SectionHolder"> - <Attribute name="title" value="(Literal)Usage"/> - <Attribute name="background" value="(Literal)0xFFFFFF"/> - <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> - <Content> - <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> - <Attribute name="beanNode" value="beanNode"/> - <Attribute name="preferredSize" value="(Literal)400,250"/> - <Attribute name="attributeName" value="(Literal)Usage"/> - </Component> - </Content> - </Component> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Peak Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> ! <Content> ! <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="beanNode" value="beanNode"/> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)PeakUsage"/> ! </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> --- 1,61 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="All Memory Pool Graphs"> ! <Description>Memory usage graph for all JRE 1.5 Memory Pools.</Description> ! <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="memoryPools" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> ! </BeanMatch> ! </DashboardMatch> ! <LayoutManager type="org.jdesktop.swingx.VerticalLayout"/> ! <Content> ! ! ! <Component type="org.mc4j.console.dashboard.components.ForEachPanelComponent"> ! ! <Attribute name="beanList" value="memoryPools"/> ! <Attribute name="IdKey" value="'memoryPool'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="preferredSize" value="100,100"/> ! <LayoutManager type="" axis="Y_AXIS"/> ! <Content> ! ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> ! <Content> ! <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="bean" value="#memoryPool"/> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'Usage'"/> </Component> + </Content> + </Component> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Peak Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> ! <Content> ! <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="bean" value="#memoryPool"/> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'PeakUsage'"/> </Component> </Content> </Component> + </Content> ! ! </Component> ! ! ! </Content> </Dashboard> Index: JRE15_Deadlock.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_Deadlock.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** JRE15_Deadlock.xml 5 Oct 2004 04:01:07 -0000 1.1 --- JRE15_Deadlock.xml 12 Apr 2006 17:28:34 -0000 1.1.2.1 *************** *** 1,12 **** <?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="Deadlock"> <Description>Deadlocked threads.</Description> <DashboardMatch type="Global" location="/JVM"> ! <BeanMatch id="MBeanNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Deadlock" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>Deadlocked threads.</Description> <DashboardMatch type="Global" location="/JVM"> ! <BeanMatch id="threadingBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> *************** *** 14,55 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> - - <!-- *** The header section displays title and a refresh control *** --> - <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)1000"/> - </Component> - </Content> - </Component> ! <Component type="javax.swing.JScrollPane"> ! <Content> ! <Component type="org.mc4j.jre15.components.DeadlockDetectionComponent"/> ! </Content> ! </Component> </Content> </Dashboard> --- 14,24 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! ! ! <Component type="org.mc4j.jre15.components.DeadlockDetectionComponent"> ! <Attribute name="bean" value="threadingBean"/> ! </Component> ! </Content> </Dashboard> Index: JRE15_MemoryUsage_AreaChart.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsage_AreaChart.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** JRE15_MemoryUsage_AreaChart.xml 26 May 2004 03:10:58 -0000 1.1 --- JRE15_MemoryUsage_AreaChart.xml 12 Apr 2006 17:28:34 -0000 1.1.2.1 *************** *** 1,12 **** <?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="Pool Usage Area Chart"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="MemoryPools" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Pool Usage Area Chart" standardHeader="true" autoRefresh="false" refreshControl="false"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="memoryPools" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> *************** *** 15,49 **** <Content> ! <!-- *** The header section displays title and a refresh control *** --> ! <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> ! </Content> ! </Component> ! <Component type="org.mc4j.jre15.components.MemoryUsageAreaChartComponent"> ! <Attribute name="beanList" value="MemoryPools"/> ! <Attribute name="preferredSize" value="(Literal)400,250"/> </Component> --- 15,23 ---- <Content> ! ! <Component type="org.mc4j.jre15.components.MemoryUsageAreaChartComponent"> ! <Attribute name="beanList" value="#memoryPools"/> ! <Attribute name="preferredSize" value="'400,250'"/> </Component> Index: JRE15_MemoryUsage_Graph.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsage_Graph.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** JRE15_MemoryUsage_Graph.xml 8 Apr 2004 21:38:26 -0000 1.4 --- JRE15_MemoryUsage_Graph.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,12 **** <?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="(Message){name} Memory Pool Graph"> <Description>Memory usage graph for a JRE 1.5 Memory Pool.</Description> <DashboardMatch type="Bean"> ! <BeanMatch id="MemoryPoolNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="(Message){name} Memory Pool Graph" standardHeader="true"> <Description>Memory usage graph for a JRE 1.5 Memory Pool.</Description> <DashboardMatch type="Bean"> ! <BeanMatch id="memoryPool" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> *************** *** 15,53 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> ! ! <!-- *** The header section displays title and a refresh control *** --> ! <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> ! </Content> ! </Component> ! <!-- *** Scroll pane of info *** --> <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Content> <Component type="javax.swing.JPanel"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="preferredSize" value="100,100"/> --- 15,26 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! ! <!-- *** Scroll pane of info *** --> <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="'0xFFFFFF'"/> <Content> <Component type="javax.swing.JPanel"> ! <Attribute name="background" value="'0xFFFFFF'"/> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="preferredSize" value="100,100"/> *************** *** 56,67 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="beanNode" value="MemoryPoolNode"/> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)Usage"/> </Component> </Content> --- 29,40 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="bean" value="#memoryPool"/> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'Usage'"/> </Component> </Content> *************** *** 69,87 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Peak Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="beanNode" value="MemoryPoolNode"/> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)PeakUsage"/> </Component> </Content> </Component> - <Component type="org.mc4j.console.dashboard.components.FillerComponent"> - <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> - </Component> </Content> --- 42,57 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Peak Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="bean" value="#memoryPool"/> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'PeakUsage'"/> </Component> </Content> </Component> </Content> Index: JRE15_MemoryUsagePools_PieChart.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsagePools_PieChart.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** JRE15_MemoryUsagePools_PieChart.xml 16 Apr 2004 15:57:46 -0000 1.4 --- JRE15_MemoryUsagePools_PieChart.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,12 **** <?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="Pool Usage Pie Chart"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="MBeanList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="1." name="Pool Usage Pie Chart" standardHeader="true"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="memoryPools" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> *************** *** 15,56 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <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> - </Content> - </Component> <Component type="org.mc4j.jre15.components.MemoryUsagePieChartComponent"> ! <Attribute name="preferredSize" value="(Literal)400,250"/> </Component> <!-- *** Scroll pane of info *** --> <!-- <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Content> <Component type="javax.swing.JPanel"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="preferredSize" value="100,100"/> --- 15,30 ---- <Content> <Component type="org.mc4j.jre15.components.MemoryUsagePieChartComponent"> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="beanList" value="#memoryPools"/> </Component> <!-- *** Scroll pane of info *** --> <!-- <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="'0xFFFFFF'"/> <Content> <Component type="javax.swing.JPanel"> ! <Attribute name="background" value="'0xFFFFFF'"/> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="preferredSize" value="100,100"/> *************** *** 59,69 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)Usage"/> </Component> </Content> --- 33,43 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'Usage'"/> </Component> </Content> *************** *** 71,88 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Peak Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)PeakUsage"/> </Component> </Content> </Component> - <Component type="org.mc4j.console.dashboard.components.FillerComponent"> - <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> - </Component> </Content> --- 45,59 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Peak Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'PeakUsage'"/> </Component> </Content> </Component> </Content> Index: JRE15_ThreadTree.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_ThreadTree.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** JRE15_ThreadTree.xml 16 Apr 2004 15:57:46 -0000 1.4 --- JRE15_ThreadTree.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,12 **** <?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="Threading"> <Description>Live thread states and stacks.</Description> <DashboardMatch type="Global" location="/JVM"> ! <BeanMatch id="MBeanNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Threading" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>Live thread states and stacks.</Description> <DashboardMatch type="Global" location="/JVM"> ! <BeanMatch id="threadBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> *************** *** 15,51 **** <Content> ! <!-- *** The header section displays title and a refresh control *** --> ! <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)1000"/> ! </Component> ! </Content> ! </Component> <Component type="org.mc4j.jre15.components.ThreadMBeanThreadBrowserComponent"> </Component> --- 15,22 ---- <Content> ! <Component type="org.mc4j.jre15.components.ThreadMBeanThreadBrowserComponent"> + <Attribute name="bean" value="#threadBean"/> </Component> --- NEW FILE: JRE15_SystemInfo.xml --- <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <Dashboard version="2.0" name="JVM Info" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>General Java Virtual Machine statistics</Description> <DashboardMatch type="Global" location="/JVM"> <BeanMatch id="Runtime" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Runtime"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="OperatingSystem" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=OperatingSystem"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="Threading" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Threading"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="Memory" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Memory"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="ClassLoading" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=ClassLoading"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="Compilation" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Compilation"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="garbageCollectors" type="Multiple"> <Condition type="BeanObjectNameRegexCondition" filter="type=GarbageCollector"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> <Attribute name="html"> <![CDATA[ <table cellpadding="2"> <tr><td colspan="2"><font size="+2"><u>Summary</u></font></u></td></tr> <tr> <td align="right"><b>Uptime:</b></td><td> ${#format.timeMillis(#Runtime.Uptime)}</td> <td align="right"><b>Process CPU Time:</b></td><td> ${#format.timeNanos(#OperatingSystem.ProcessCpuTime)} </td> </tr> <tr><td colspan="2"><font size="+2"><u>Threads</u></font></td></tr> <tr> <td align="right"><b>Live Threads:</b></td><td> ${Threading.ThreadCount}</td> <td align="right"><b>Peak Threads:</b></td><td> ${Threading.PeakThreadCount}</td> </tr> <tr> <td align="right"><b>Daemon Threads:</b></td><td> ${Threading.DaemonThreadCount}</td> <td align="right"><b>Total Started:</b></td><td> ${Threading.TotalStartedThreadCount}</td> </tr> <tr><td colspan="4"><font size="+2"><u>Memory</u></font></td></tr> <tr> <td align="right"><b>Current Heap Size:</b></td><td> ${#format.sizeBytes(Memory.HeapMemoryUsage["used"])}</td> <td align="right"><b>Commited Heap:</b></td><td> ${#format.sizeBytes(Memory.HeapMemoryUsage["committed"])}</td> </tr> <tr> <td align="right"><b>Maximum Heap:</b></td><td> ${#format.sizeBytes(Memory.HeapMemoryUsage["max"])}</td> <td align="right"><b>Object pending finalization:</b></td><td> ${Memory.ObjectPendingFinalizationCount}</td> </tr> <tr><td colspan="4"><font size="+2"><u>Classes</u></font></td></tr> <tr> <td align="right"><b>Current classes loaded:</b></td><td> ${ClassLoading.LoadedClassCount}</td> <td align="right"><b>Unloaded classes:</b></td><td> ${ClassLoading.UnloadedClassCount}</td> </tr> <tr> <td align="right"><b>Total classes loaded:</b></td><td> ${ClassLoading.TotalLoadedClassCount}</td> <td align="right"><b>Compile time:</b></td><td> ${#format.timeMillis(Compilation.TotalCompilationTime)}</td> </tr> </table> <object classid="SystemProperties"> </object> ]]> </Attribute> <Content> <Component type="org.mc4j.console.swing.SectionHolder" id="SystemProperties"> <Attribute name="title" value="'System Properties'"/> <!--<Attribute name="width" value="'500'"/>--> <Content> <Component type="org.mc4j.console.dashboard.components.TabularDataComponent"> <Attribute name="bean" value="#Runtime"/> <Attribute name="refreshable" value="false"/> <Attribute name="preferredSize" value="'500,350'"/> <Attribute name="attributeName" value="'SystemProperties'"/> </Component> </Content> </Component> </Content> </Component> <!-- #foreach($collector : ${garbageCollectors}) <tr> <td>Garbage Collector: ${$collector.Name}</td> <td colspan="3"> Collections: ${$collector.CollectionCount} Collection Time: ${$collector.CollectionTime} </td> </tr> #endfor --> </Content> </Dashboard> Index: JRE15_MemoryUsage_LineChart.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsage_LineChart.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** JRE15_MemoryUsage_LineChart.xml 16 Apr 2004 15:57:38 -0000 1.4 --- JRE15_MemoryUsage_LineChart.xml 12 Apr 2006 17:28:34 -0000 1.4.2.1 *************** *** 1,12 **** <?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="Pool Usage Line Chart"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="MBeanList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Pool Usage Line Chart" standardHeader="true"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="memoryPools" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> *************** *** 14,48 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> ! ! <!-- *** The header section displays title and a refresh control *** --> ! <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> ! </Content> ! </Component> <Component type="org.mc4j.jre15.components.MemoryUsageLineChartComponent"> ! <Attribute name="preferredSize" value="(Literal)400,250"/> </Component> --- 14,22 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! <Component type="org.mc4j.jre15.components.MemoryUsageLineChartComponent"> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="beanList" value="#memoryPools"/> </Component> --- NEW FILE: JRE15_ThreadInfo.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <Dashboard version="2.0" name="Thread Info" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>Live thread states and stacks.</Description> <DashboardMatch type="Global" location="/JVM"> <BeanMatch id="threadBean" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.jre15.components.ThreadsViewComponent"> <Attribute name="bean" value="#threadBean"/> </Component> </Content> </Dashboard> |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:15
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/websphere In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/application/dashboards/websphere Modified Files: Tag: ems_module_separation WebSphere_ServerDashboard.xml Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: WebSphere_ServerDashboard.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/websphere/WebSphere_ServerDashboard.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** WebSphere_ServerDashboard.xml 19 Jan 2005 14:17:02 -0000 1.1 --- WebSphere_ServerDashboard.xml 12 Apr 2006 17:28:34 -0000 1.1.2.1 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 7,11 **** --> ! <Dashboard version="1.0" name="JBoss Server Dashboard"> <Description>This dashboard displays basic information relating to the overall execution of a WebSphere server.</Description> --- 7,11 ---- --> ! <Dashboard version="2.0" name="JBoss Server Dashboard"> <Description>This dashboard displays basic information relating to the overall execution of a WebSphere server.</Description> *************** *** 27,32 **** <BeanMatch id="ServerBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="WebSphere:"/> ! <Condition type="BeanObjectNameCondition" filter="type=Server"/> </BeanMatch> --- 27,32 ---- <BeanMatch id="ServerBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="WebSphere:"/> ! <Condition type="BeanObjectNameRegexCondition" filter="type=Server"/> </BeanMatch> *************** *** 46,51 **** --> <BeanMatch id="JVMBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="WebSphere:"/> ! <Condition type="BeanObjectNameCondition" filter="type=JVM"/> </BeanMatch> --- 46,51 ---- --> <BeanMatch id="JVMBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="WebSphere:"/> ! <Condition type="BeanObjectNameRegexCondition" filter="type=JVM"/> </BeanMatch> |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:15
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/install/finder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/connection/install/finder Modified Files: Tag: ems_module_separation FileSystemModel.java ServerInstallFinder.java ServerInstallInfo.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: ServerInstallFinder.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/install/finder/ServerInstallFinder.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** ServerInstallFinder.java 5 Oct 2004 05:15:58 -0000 1.2 --- ServerInstallFinder.java 12 Apr 2006 17:28:37 -0000 1.2.2.1 *************** *** 17,27 **** package org.mc4j.console.connection.install.finder; ! import org.mc4j.console.ManagementNode; ! import org.mc4j.console.connection.install.ConnectionTypeDescriptor; ! import java.util.Map; import java.util.HashMap; import java.util.Iterator; ! import java.io.File; /** --- 17,27 ---- package org.mc4j.console.connection.install.finder; ! import org.mc4j.ems.connection.ConnectionFactory; ! import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; ! import java.io.File; import java.util.HashMap; import java.util.Iterator; ! import java.util.Map; /** *************** *** 31,34 **** --- 31,40 ---- public class ServerInstallFinder { + /** + * A map of the install directory to the recognition file used to recognize + * that install. + */ + private Map<File,File> recognitionFiles = new HashMap<File, File>(); + public static void main(String[] args) { outputClassloaders(ServerInstallFinder.class.getClassLoader()); *************** *** 57,62 **** public ServerInstallFinder() { ! for (int i = 0; i < ManagementNode.CONNECTION_DESCRIPTORS.length; i++) { ! ConnectionTypeDescriptor connectionDescriptor = ManagementNode.CONNECTION_DESCRIPTORS[i]; if (connectionDescriptor.getRecongnitionPath() != null) { recognitionMap.put(connectionDescriptor.getRecongnitionPath(), connectionDescriptor); --- 63,68 ---- public ServerInstallFinder() { ! ! for (ConnectionTypeDescriptor connectionDescriptor : ConnectionFactory.getConnectionTypes()) { if (connectionDescriptor.getRecongnitionPath() != null) { recognitionMap.put(connectionDescriptor.getRecongnitionPath(), connectionDescriptor); *************** *** 67,72 **** public void testDir(File file) { File[] children = file.listFiles(); ! for (int i = 0; i < children.length; i++) { ! File child = children[i]; if (child.isDirectory()) { ConnectionTypeDescriptor type = getServerTypePath(child); --- 73,77 ---- public void testDir(File file) { File[] children = file.listFiles(); ! for (File child : children) { if (child.isDirectory()) { ConnectionTypeDescriptor type = getServerTypePath(child); *************** *** 79,82 **** --- 84,91 ---- } + public File getRecognitionFile(File intallDirectory) { + return this.recognitionFiles.get(intallDirectory); + } + public ConnectionTypeDescriptor getServerTypePath(File file) { for (Iterator iterator = recognitionMap.entrySet().iterator(); iterator.hasNext();) { *************** *** 85,95 **** ConnectionTypeDescriptor descriptor = (ConnectionTypeDescriptor) entry.getValue(); ! if (matches(file, recognition)) return descriptor; } return null; } ! public boolean matches(File file, String recognition) { int l = recognition.indexOf('/'); String name = recognition; --- 94,107 ---- ConnectionTypeDescriptor descriptor = (ConnectionTypeDescriptor) entry.getValue(); ! File recognitionFile = matches(file, recognition); ! if (recognitionFile != null) { ! recognitionFiles.put(file, recognitionFile); return descriptor; + } } return null; } ! public File matches(File parentFile, String recognition) { int l = recognition.indexOf('/'); String name = recognition; *************** *** 100,113 **** } ! File curFile = new File(file.getAbsoluteFile() + "/" + name); ! if (!curFile.exists()) ! return false; ! ! if (nextName != null) { ! return matches(curFile,nextName); } else { ! return true; ! } } --- 112,133 ---- } ! if ("*".equals(name)) { ! File[] children = parentFile.listFiles(new FileSystemModel.DirectoryFilter()); ! for (File child : children) { ! File found = matches(child,nextName); ! if (found != null) return found; ! } ! return null; } else { ! File curFile = new File(parentFile.getAbsoluteFile() + "/" + name); ! if (!curFile.exists()) ! return null; + if (nextName != null) { + return matches(curFile,nextName); + } else { + return curFile; + } + } } Index: ServerInstallInfo.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/install/finder/ServerInstallInfo.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** ServerInstallInfo.java 14 Mar 2005 15:16:14 -0000 1.4 --- ServerInstallInfo.java 12 Apr 2006 17:28:37 -0000 1.4.2.1 *************** *** 17,21 **** package org.mc4j.console.connection.install.finder; ! import org.mc4j.console.connection.install.ConnectionTypeDescriptor; import java.io.File; --- 17,21 ---- package org.mc4j.console.connection.install.finder; ! import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; import java.io.File; Index: FileSystemModel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/install/finder/FileSystemModel.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** FileSystemModel.java 14 Mar 2005 15:16:04 -0000 1.3 --- FileSystemModel.java 12 Apr 2006 17:28:37 -0000 1.3.2.1 *************** *** 17,31 **** package org.mc4j.console.connection.install.finder; - import org.mc4j.console.connection.install.ConnectionTypeDescriptor; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; - import javax.swing.event.TreeModelListener; - import java.util.Map; - import java.util.HashMap; - import java.util.Vector; - import java.util.Arrays; import java.io.File; import java.io.FileFilter; /** --- 17,32 ---- package org.mc4j.console.connection.install.finder; + import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; + + import javax.swing.event.TreeModelListener; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; import java.io.File; import java.io.FileFilter; + import java.util.Arrays; + import java.util.HashMap; + import java.util.Map; + import java.util.Vector; /** *************** *** 97,101 **** ConnectionTypeDescriptor type = finder.getServerTypePath(f); if (type != null) { ! File recognitionFile = new File(f.getAbsolutePath() + "/" + type.getRecongnitionPath()); String version = type.getServerVersion(recognitionFile); if (version == null) { --- 98,102 ---- ConnectionTypeDescriptor type = finder.getServerTypePath(f); if (type != null) { ! File recognitionFile = finder.getRecognitionFile(f); String version = type.getServerVersion(recognitionFile); if (version == null) { |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/dashboard/components Modified Files: Tag: ems_module_separation AttributeComponent.java AttributeListComponent.java AttributeTableComponent.java AttributeTablePopupComponent.java AttributeTreeTableExplorer.java BeanComponent.java BeanListComponent.java ForEachPanelComponent.java MBeanTreeComponent.java NumericAttributeGaugeMeter.java NumericAttributeGraph.java NumericAttributeMeter.java OperationListComponent.java RefreshControlComponent.java TimeLabelComponent.java Added Files: Tag: ems_module_separation ErrorComponent.java OperationResultTableComponent.java TabularDataComponent.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: AttributeTableComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/AttributeTableComponent.java,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** AttributeTableComponent.java 14 Mar 2005 16:17:22 -0000 1.12 --- AttributeTableComponent.java 12 Apr 2006 17:28:37 -0000 1.12.2.1 *************** *** 17,50 **** package org.mc4j.console.dashboard.components; ! import org.jdesktop.jdnc.JNTable; ! import org.jdesktop.swing.JXTable; ! import org.jdesktop.swing.decorator.AlternateRowHighlighter; ! import org.jdesktop.swing.decorator.ComponentAdapter; ! import org.jdesktop.swing.decorator.ConditionalHighlighter; ! import org.jdesktop.swing.decorator.Highlighter; ! import org.jdesktop.swing.decorator.HighlighterPipeline; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.bean.operation.OperationNode; ! import org.mc4j.console.connection.ConnectionNode; ! import org.mc4j.console.dashboard.Dashboard; ! import org.mc4j.console.swing.table.TableMap; ! import org.mc4j.console.swing.table.TableSorter; import javax.swing.*; - import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; ! import javax.swing.table.JTableHeader; ! import javax.swing.table.TableCellRenderer; ! import javax.swing.table.TableModel; ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Font; ! import java.util.ArrayList; ! import java.util.Arrays; ! import java.util.Iterator; import java.util.List; - import java.util.Map; /** --- 17,35 ---- package org.mc4j.console.dashboard.components; ! ! ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; ! import org.jdesktop.swingx.JXTable; ! import org.jdesktop.swingx.decorator.HighlighterPipeline; ! import org.jdesktop.swingx.decorator.AlternateRowHighlighter; ! import org.jdesktop.swingx.decorator.Highlighter; import javax.swing.*; import javax.swing.table.DefaultTableModel; ! import java.awt.*; ! import java.util.*; import java.util.List; /** *************** *** 56,68 **** protected List attributeNames = new ArrayList(); ! protected List mbeanNodes; ! ! protected MBeanNode mbeanNode; protected String label = ""; - protected JScrollPane scrollPane; protected JXTable table; - protected TableSorter tableSorter; protected AttributeTableModel tableModel; --- 41,49 ---- protected List attributeNames = new ArrayList(); ! protected List<EmsBean> beanList; protected String label = ""; protected JXTable table; protected AttributeTableModel tableModel; *************** *** 81,88 **** - private Dashboard dashboard; - - private ConnectionNode connectionNode; - public void init() { --- 62,65 ---- *************** *** 100,138 **** ! this.tableModel = new AttributeTableModel(columnNames, this.mbeanNodes.size()); ! // this.tableSorter = new TableSorter(this.tableModel); ! JNTable nTable = new JNTable(tableModel); ! nTable.setHasColumnControl(true); ! this.table = nTable.getTable();//new JXTable(tableModel); //this.tableSorter); ! // this.scrollPane = new JScrollPane(this.table); ! // this.tableSorter.addMouseListenerToHeaderInTable(this.table); this.table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); ! // this.table.setFont(VALUE_FONT); ! this.table.setHighlighters(new HighlighterPipeline(new Highlighter[]{new AlternateRowHighlighter(), new ChangeHighlighter()})); - /*for (int i = 0; i < attributeNames.size(); i++) { - this.table.getColumnModel().getColumn(i).setHeaderRenderer(new SortHeaderRenderer()); - this.table.getColumnModel().getColumn(i).setCellRenderer(new ChangeRenderer()); - }*/ ! add(nTable, BorderLayout.CENTER); // The first refresh sets column classes properly refresh(); - // iterate over the column classes and proxy them to a highlighting renderer this.doLayout(); this.repaint(); - //Thread refresher = new Thread(this, "AttributeTableRefresher"); - //refresher.start(); } ! public class ChangeHighlighter extends ConditionalHighlighter { public ChangeHighlighter() { setForeground(Color.red); --- 77,104 ---- ! this.tableModel = new AttributeTableModel(columnNames, this.attributeNames.size()); ! this.table = new JXTable(tableModel); ! ! this.table.setColumnControlVisible(true); this.table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); ! this.table.setHighlighters(new HighlighterPipeline(new Highlighter[]{new AlternateRowHighlighter()/*, new ChangeHighlighter()*/})); ! add(new JScrollPane(this.table), BorderLayout.CENTER); // The first refresh sets column classes properly refresh(); this.doLayout(); this.repaint(); } ! /* public class ChangeHighlighter extends ConditionalHighlighter { public ChangeHighlighter() { setForeground(Color.red); *************** *** 148,152 **** table.convertColumnIndexToModel(componentAdapter.column)); } ! } public void refresh() { --- 114,118 ---- table.convertColumnIndexToModel(componentAdapter.column)); } ! }*/ public void refresh() { *************** *** 165,169 **** if (null != matchedDashboards) { // very much magic here: ! // - BeanMatchList(0) contains the id of the match list // - the contextStarter contains the list of mbeanNodes under that id --- 131,135 ---- if (null != matchedDashboards) { // very much magic here: ! // - BeanMatchList (0) contains the id of the match list // - the contextStarter contains the list of mbeanNodes under that id *************** *** 184,193 **** int row = 0; ! for (Iterator iterator = mbeanNodes.iterator(); iterator.hasNext();) { ! MBeanNode beanNode = (MBeanNode) iterator.next(); ! if (beanNode.isRegistered()) { ! beanNode.retrieveData(); ! Map attributeNodeMap = beanNode.getAttributeNodeMap(); int col = 0; --- 150,156 ---- int row = 0; ! for (EmsBean bean : beanList) { ! if (true) { // TODO if bean.isRegistered()) { int col = 0; *************** *** 195,215 **** String attributeName = (String) iterator1.next(); ! AttributeNode node = (AttributeNode) attributeNodeMap.get(attributeName); Object value = null; ! if (node != null) { ! value = node.getValue(); } else { ! value = beanNode.getObjectName().getKeyProperty(attributeName); if (value == null) { // Treat it like an operation. ! OperationNode operationNode = ! (OperationNode) beanNode.getOperationNodeMap().get(attributeName); ! value = operationNode; - /*if (!(table.getColumnModel().getColumn(col).getCellRenderer() instanceof ButtonRenderer)) { - table.getColumnExt(col).setCellRenderer(new ButtonRenderer()); - table.getColumnExt(col).setCellEditor(new ButtonEditor(new JCheckBox())); - }*/ } else if (value == null) --- 158,177 ---- String attributeName = (String) iterator1.next(); ! EmsAttribute attribute = bean.getAttribute(attributeName); Object value = null; ! if (attribute != null) { ! value = attribute.refresh(); } else { ! value = bean.getBeanName().getKeyProperty(attributeName); if (value == null) { // Treat it like an operation. ! EmsOperation operation = bean.getOperation(attributeName); + try { + value = operation.invoke(); + } catch (Exception e) { + e.printStackTrace(); + } } else if (value == null) *************** *** 232,236 **** // the MBean of the current node is not any longer registered inside the MBeanServer -> remove it from the list this.tableModel.removeRow(row); ! iterator.remove(); } } --- 194,198 ---- // the MBean of the current node is not any longer registered inside the MBeanServer -> remove it from the list this.tableModel.removeRow(row); ! beanList.remove(bean); } } *************** *** 349,369 **** } ! public void setBeanList(List list) { ! this.mbeanNodes = list; ! ! if (!list.isEmpty()) { ! // this assumes that all mbean are from the same connection ! connectionNode = ((MBeanNode) list.get(0)).getConnectionNode(); ! } } public void setContext(Map context) { ! if (this.mbeanNodes == null) { throw new IllegalStateException("AttributeTableComponent: You must specify an appropriate [beanList] attribute."); } - dashboard = (Dashboard) context.get(Dashboard.CONTEXT_DASHBOARD); - init(); } --- 311,324 ---- } ! public void setBeanList(List<EmsBean> beans) { ! this.beanList = beans; } public void setContext(Map context) { ! if (this.beanList == null) { throw new IllegalStateException("AttributeTableComponent: You must specify an appropriate [beanList] attribute."); } init(); } *************** *** 386,478 **** this.label = label; } - - - public static class SortHeaderRenderer - extends DefaultTableCellRenderer { - - private static Icon ascendingIcon = createImageIcon("images/Up.gif"); - private static Icon descendingIcon = createImageIcon("images/Down.gif"); - - - /** - * Returns an ImageIcon, or null if the path was invalid. - */ - protected static ImageIcon createImageIcon(String path) { - java.net.URL imgURL = RefreshControlComponent.class.getClassLoader().getResource(path); - if (imgURL != null) { - return new ImageIcon(imgURL); - } else { - System.err.println("Couldn't find file: " + path); - return null; - } - } - - public SortHeaderRenderer() { - setHorizontalTextPosition(LEFT); - setHorizontalAlignment(CENTER); - } - - public Component getTableCellRendererComponent(JTable table, Object value, - boolean isSelected, boolean hasFocus, - int row, int col) { - int index = -1; - boolean ascending = true; - - TableModel model = table.getModel(); - - if (model instanceof TableSorter) { - index = ((TableSorter) model).getCurrentSortColumn(); - ascending = ((TableSorter) model).isAscending(); - } - - if (table != null) { - JTableHeader header = table.getTableHeader(); - if (header != null) { - setForeground(header.getForeground()); - setBackground(header.getBackground()); - setFont(header.getFont()); - } - } - - setFont(getFont().deriveFont((index == col) ? Font.BOLD : Font.PLAIN)); - if (index == col) { - setIcon(ascending ? ascendingIcon : descendingIcon); - } else { - setIcon(null); - } - setText((value == null) ? "" : value.toString()); - setBorder(UIManager.getBorder("TableHeader.cellBorder")); - return this; - } - } - - - public static class ChangeRenderer extends DefaultTableCellRenderer - implements TableCellRenderer { - - public Component getTableCellRendererComponent(JTable table, Object value, - boolean isSelected, boolean hasFocus, - int row, int column) { - - Component comp = - super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); - - TableModel model = table.getModel(); - if (model instanceof TableSorter) { - int realRow = ((TableSorter) model).translateRow(row); - model = ((TableMap) model).getModel(); - if (model instanceof AttributeTableModel) { - if (((AttributeTableModel) model).isValueAtChanged(realRow, column)) { - comp.setForeground(Color.red); - setFont(getFont().deriveFont(Font.BOLD)); - } else { - comp.setForeground(Color.black); - setFont(getFont().deriveFont(Font.PLAIN)); - } - } - } - return comp; - } - } - } --- 341,343 ---- Index: NumericAttributeMeter.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/NumericAttributeMeter.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** NumericAttributeMeter.java 5 Oct 2004 05:16:00 -0000 1.11 --- NumericAttributeMeter.java 12 Apr 2006 17:28:37 -0000 1.11.2.1 *************** *** 17,31 **** package org.mc4j.console.dashboard.components; - import java.awt.BorderLayout; - import java.util.Map; - - import javax.management.MBeanServer; - import javax.management.ObjectName; - - import org.openide.windows.TopComponent; - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.dashboard.DashboardComponent; import org.mc4j.console.swing.graph.MeterCanvas; /** --- 17,28 ---- package org.mc4j.console.dashboard.components; import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.swing.graph.MeterCanvas; + import org.mc4j.ems.connection.bean.EmsBean; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; + import org.openide.windows.TopComponent; + + import java.awt.BorderLayout; + import java.util.Map; /** *************** *** 36,43 **** public class NumericAttributeMeter extends TopComponent implements Runnable, BeanComponent { ! private MBeanServer server; ! private ObjectName objectName; ! ! private MBeanNode beanNode; private String currentAttributeName; --- 33,38 ---- public class NumericAttributeMeter extends TopComponent implements Runnable, BeanComponent { ! private EmsBean emsBean; ! private EmsAttribute maxAttribute, currentAttribute; private String currentAttributeName; *************** *** 76,80 **** int max; if (this.maxAttributeName != null) { ! Number maxNumber = (Number) this.server.getAttribute(this.objectName,this.maxAttributeName); max = maxNumber.intValue(); } else { --- 71,75 ---- int max; if (this.maxAttributeName != null) { ! Number maxNumber = (Number) this.maxAttribute.getValue(); max = maxNumber.intValue(); } else { *************** *** 82,86 **** } ! Number current = (Number) this.server.getAttribute(this.objectName,this.currentAttributeName); this.meter.setMax(max); --- 77,81 ---- } ! Number current = (Number) this.currentAttribute.getValue(); this.meter.setMax(max); *************** *** 98,113 **** } ! public void setBeanNode(MBeanNode node) { ! this.beanNode = node; } public void setContext(Map context) { ! if (this.beanNode == null) { throw new IllegalStateException( ! "NumericAttributeMeter: context atribute [beanNode] not set."); } ! this.server = this.beanNode.getMBeanServer(); ! this.objectName = this.beanNode.getObjectName(); Thread updater = new Thread(this, "mc4j NumericAttributeMeter Updater"); --- 93,111 ---- } ! public void setBean(EmsBean emsBean) { ! this.emsBean = emsBean; } public void setContext(Map context) { ! if (this.emsBean == null) { throw new IllegalStateException( ! "NumericAttributeMeter: context atribute [bean] not set."); } ! if (this.maxAttributeName != null) ! this.maxAttribute = this.emsBean.getAttribute(this.maxAttributeName); ! ! this.currentAttribute = this.emsBean.getAttribute(currentAttributeName); ! Thread updater = new Thread(this, "mc4j NumericAttributeMeter Updater"); Index: OperationListComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/OperationListComponent.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** OperationListComponent.java 5 Oct 2004 05:16:00 -0000 1.8 --- OperationListComponent.java 12 Apr 2006 17:28:37 -0000 1.8.2.1 *************** *** 17,20 **** --- 17,26 ---- package org.mc4j.console.dashboard.components; + import org.mc4j.console.bean.operation.OperationExecuteNodeAction; + import org.mc4j.ems.connection.bean.EmsBean; + import org.mc4j.ems.connection.bean.operation.EmsOperation; + import org.openide.util.actions.SystemAction; + + import javax.swing.*; import java.awt.Font; import java.awt.GridBagConstraints; *************** *** 23,51 **** import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import java.util.HashSet; ! import java.util.Iterator; import java.util.Map; import java.util.Set; - import javax.management.MBeanOperationInfo; - import javax.management.MalformedObjectNameException; - import javax.management.ObjectName; - import javax.swing.JButton; - import javax.swing.JLabel; - import javax.swing.JPanel; - - import org.openide.ErrorManager; - import org.openide.nodes.Node; - import org.openide.util.actions.SystemAction; - - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.operation.OperationExecuteNodeAction; - import org.mc4j.console.bean.operation.OperationNode; - import org.mc4j.console.connection.ConnectionNode; - import org.mc4j.console.dashboard.Dashboard; - import org.mc4j.console.dashboard.DashboardComponent; - /** - * * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) --- 29,37 ---- import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; /** * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) *************** *** 55,96 **** public static final int BUTTON_ONLY_FORMAT = 1; public static final int FULL_FORMAT = 2; ! private static final Font NAME_FONT = Font.decode("Arial-BOLD-12"); private static final Font DETAILS_FONT = Font.decode("Arial-PLAIN-10"); /** * The set of operations to be displayed */ ! private Set operationNames = new HashSet(); ! ! private MBeanNode beanNode; ! private int format = FULL_FORMAT; ! private ObjectName objectName; ! public void setOperationName(String name) { ! this.operationNames.add(name); ! } ! ! public String getAttributeName() { ! return "multi-value set"; } ! public void setObjectName(String objectName) { ! try { ! this.objectName = new ObjectName(objectName); ! } catch (MalformedObjectNameException mone) { ! ErrorManager.getDefault().notify(mone); ! } } ! public void refresh() { ! this.removeAll(); ! this.setMinimumSize(null); this.setPreferredSize(null); --- 41,75 ---- public static final int BUTTON_ONLY_FORMAT = 1; public static final int FULL_FORMAT = 2; ! private static final Font NAME_FONT = Font.decode("Arial-BOLD-12"); private static final Font DETAILS_FONT = Font.decode("Arial-PLAIN-10"); + private EmsBean emsBean; /** * The set of operations to be displayed */ ! private Set<EmsOperation> operations = new LinkedHashSet<EmsOperation>(); ! private int format = FULL_FORMAT; ! public void setBean(EmsBean bean) { ! this.emsBean = bean; ! } ! public void setOperation(EmsOperation name) { ! this.operations.add(name); } ! public void refresh() { } ! ! public void setContext(Map context) { ! this.removeAll(); ! this.setMinimumSize(null); this.setPreferredSize(null); *************** *** 98,201 **** this.setLayout(new GridBagLayout()); this.setOpaque(false); ! ! Set operSet = this.beanNode.getOperationNodeMap().entrySet(); ! Iterator operIter = operSet.iterator(); int row = 1; ! while (operIter.hasNext()) { ! Map.Entry entry = (Map.Entry) operIter.next(); ! ! String operName = (String) entry.getKey(); ! if ((this.operationNames.size() == 0) || (this.operationNames.contains(operName))) { ! final OperationNode operationNode = (OperationNode) entry.getValue(); ! ! final MBeanOperationInfo operationInfo = operationNode.getOperationInfo(); ! ! JButton executeButton = new JButton( ! (this.format == BUTTON_ONLY_FORMAT)?operationInfo.getName():"Execute..."); ! ! executeButton.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent e) { ! executeOperation(operationNode); ! } ! }); ! ! switch (this.format) { ! case BUTTON_ONLY_FORMAT: ! ! ! GridBagConstraints bc = new GridBagConstraints(); ! bc.gridx = 1; ! bc.gridy = row; ! bc.weightx = 0.5; ! bc.anchor = bc.WEST; ! bc.insets = new Insets(5,5,5,5); ! add(executeButton, bc); ! ! break; ! case FULL_FORMAT: ! ! // Add the Name label ! JLabel nameLabel = new JLabel(operationInfo.getName()); ! nameLabel.setFont(NAME_FONT); ! nameLabel.setToolTipText(operationInfo.getDescription()); - GridBagConstraints nc = new GridBagConstraints(); - nc.gridx = 1; - nc.gridy = row * 2; - nc.weightx = 0.5; - nc.anchor = nc.WEST; - nc.fill = nc.BOTH; - nc.insets = new Insets(2,2,2,2); - add(nameLabel, nc); ! // Add the execute button ! GridBagConstraints executeButtonConstraints = new GridBagConstraints( ! 2, (row * 2), ! 1, 1, ! 0.5d, 0d, ! GridBagConstraints.EAST, ! GridBagConstraints.BOTH, ! new Insets(2,2,2,2), ! 0, 0); ! ! add(executeButton, executeButtonConstraints); ! ! // Add the description Label ! JLabel descLabel = new JLabel("Description: " + operationInfo.getDescription()); ! descLabel.setFont(DETAILS_FONT); ! ! GridBagConstraints descConstraints = new GridBagConstraints( ! 1, (row * 2) + 1, ! 1, 1, ! 0.5d, 0d, ! GridBagConstraints.EAST, ! GridBagConstraints.BOTH, ! new Insets(2,2,2,2), ! 0, 0); ! add(descLabel, descConstraints); ! ! break; ! } ! ! ! ! row++; } } ! this.doLayout(); this.repaint(); } ! public void executeOperation(final OperationNode node) { ! final OperationExecuteNodeAction action = (OperationExecuteNodeAction) SystemAction.get(OperationExecuteNodeAction.class); ! Thread executor = new Thread(new Runnable() { public void run() { ! action.performAction(new Node[] { node }); } }, "mc4j Operation Execution"); --- 77,175 ---- this.setLayout(new GridBagLayout()); this.setOpaque(false); ! ! if (emsBean != null) { ! // Show all the operations for a bean ! for (final EmsOperation operation : this.emsBean.getOperations()) { ! this.operations.add(operation); ! } ! } ! int row = 1; ! for (final EmsOperation operation : this.operations) { ! JButton executeButton = new JButton( ! (this.format == BUTTON_ONLY_FORMAT) ? operation.getName() : "Execute..."); ! executeButton.setToolTipText(operation.getDescription()); ! executeButton.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent e) { ! executeOperation(operation); ! } ! }); ! switch (this.format) { ! case BUTTON_ONLY_FORMAT: ! GridBagConstraints bc = new GridBagConstraints(); ! bc.gridx = 1; ! bc.gridy = row; ! bc.weightx = 0.5; ! bc.anchor = bc.WEST; ! bc.insets = new Insets(5, 5, 5, 5); ! ! add(executeButton, bc); ! ! break; ! case FULL_FORMAT: ! ! // Add the Name label ! JLabel nameLabel = new JLabel(operation.getName()); ! nameLabel.setFont(NAME_FONT); ! nameLabel.setToolTipText(operation.getDescription()); ! ! GridBagConstraints nc = new GridBagConstraints(); ! nc.gridx = 1; ! nc.gridy = row * 2; ! nc.weightx = 0.5; ! nc.anchor = nc.WEST; ! nc.fill = nc.BOTH; ! nc.insets = new Insets(2, 2, 2, 2); ! add(nameLabel, nc); ! ! // Add the execute button ! GridBagConstraints executeButtonConstraints = new GridBagConstraints( ! 2, (row * 2), ! 1, 1, ! 0.5d, 0d, ! GridBagConstraints.EAST, ! GridBagConstraints.BOTH, ! new Insets(2, 2, 2, 2), ! 0, 0); ! ! add(executeButton, executeButtonConstraints); ! ! // Add the description Label ! JLabel descLabel = new JLabel("Description: " + operation.getDescription()); ! descLabel.setFont(DETAILS_FONT); ! ! GridBagConstraints descConstraints = new GridBagConstraints( ! 1, (row * 2) + 1, ! 1, 1, ! 0.5d, 0d, ! GridBagConstraints.EAST, ! GridBagConstraints.BOTH, ! new Insets(2, 2, 2, 2), ! 0, 0); ! add(descLabel, descConstraints); ! ! break; } + + row++; } ! this.doLayout(); this.repaint(); } ! public void executeOperation(final EmsOperation operation) { ! final OperationExecuteNodeAction action = ! (OperationExecuteNodeAction) SystemAction.get(OperationExecuteNodeAction.class); ! Thread executor = new Thread(new Runnable() { public void run() { ! action.performAction(operation); } }, "mc4j Operation Execution"); *************** *** 203,234 **** } ! public void setBeanNode(MBeanNode node) { ! this.beanNode = node; ! } ! ! public void setContext(Map context) { ! if (this.beanNode == null) { ! throw new IllegalStateException( ! "OperationListComponent: context atribute [beanNode] not set."); ! } ! refresh(); ! } ! ! ! /** Getter for property format. ! * @return Value of property format. * */ public int getFormat() { return format; } ! ! /** Setter for property format. ! * @param format New value of property format. * */ public void setFormat(int format) { this.format = format; } ! } --- 177,197 ---- } ! /** ! * Getter for property format. * + * @return Value of property format. */ public int getFormat() { return format; } ! ! /** ! * Setter for property format. * + * @param format New value of property format. */ public void setFormat(int format) { this.format = format; } ! } Index: RefreshControlComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/RefreshControlComponent.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** RefreshControlComponent.java 5 Oct 2004 05:16:00 -0000 1.5 --- RefreshControlComponent.java 12 Apr 2006 17:28:37 -0000 1.5.2.1 *************** *** 17,20 **** --- 17,28 ---- package org.mc4j.console.dashboard.components; + import org.mc4j.console.Refreshable; + import org.mc4j.console.dashboard.Dashboard; + import org.mc4j.console.dashboard.DashboardComponent; + import org.mc4j.console.dashboard.match.BeanMatch; + import org.mc4j.ems.connection.bean.EmsBean; + + import javax.swing.*; + import java.awt.Color; import java.awt.Component; import java.awt.Container; *************** *** 25,39 **** import java.util.TimerTask; - import javax.swing.ImageIcon; - import javax.swing.JFrame; - import javax.swing.JLabel; - import javax.swing.JPanel; - import javax.swing.JOptionPane; - import javax.swing.JDialog; - - import org.mc4j.console.Refreshable; - import org.mc4j.console.dashboard.Dashboard; - import org.mc4j.console.dashboard.DashboardComponent; - /** * --- 33,36 ---- *************** *** 51,57 **** private Timer timer; private Container rootContainer; ! private long refreshDelay = 1000; private boolean removed = false; --- 48,55 ---- private Timer timer; + private Dashboard dashboard; private Container rootContainer; ! private long refreshDelay = 5000; private boolean removed = false; *************** *** 66,71 **** private void init() { ! this.spinningIcon = createImageIcon("images/AnimatedLogo.gif","Click to stop"); ! this.stoppedIcon = createImageIcon("images/Logo1.gif", "Click to start"); this.spinningLogo = new JLabel(this.spinningIcon); this.spinningLogo.setToolTipText("Click to stop refreshes. " + --- 64,69 ---- private void init() { ! this.spinningIcon = createImageIcon("images/AnimatedLogoMC4J2_64.gif" /*"images/AnimatedLogo.gif"*/,"Click to stop"); ! this.stoppedIcon = createImageIcon("images/AnimatedLogoStoppedMC4J2_64.gif", "Click to start"); this.spinningLogo = new JLabel(this.spinningIcon); this.spinningLogo.setToolTipText("Click to stop refreshes. " + *************** *** 73,78 **** //icon.setImageObserver(label); add(this.spinningLogo); ! this.spinningLogo.setSize(72,72); ! setSize(72,72); doLayout(); --- 71,77 ---- //icon.setImageObserver(label); add(this.spinningLogo); ! this.spinningLogo.setSize(64,38); ! ! setSize(64,38); doLayout(); *************** *** 159,162 **** --- 158,163 ---- public void setContext(Map context) { + this.dashboard = (Dashboard) context.get(Dashboard.CONTEXT_DASHBOARD); + this.rootContainer = (Container) context.get(Dashboard.CONTEXT_DASHBOARD_ROOT_CONTAINER); *************** *** 168,171 **** --- 169,173 ---- private void refreshContainer(Container container) { + for (int i = 0; i < container.getComponents().length; i++) { Component component = container.getComponents()[i]; *************** *** 181,184 **** --- 183,201 ---- public void refresh() { + // Refresh the beans attached to this dashboard + if (dashboard.isAutoBeanRefresh()) { + + for (BeanMatch match : dashboard.getDashboardMatch().getBeanMatchList()) { + for (EmsBean bean : match.getMatchedBeans()) { + // Currently refreshing all attributes... may be slower for beans + // with large numbers of attributes that aren't all being displayed + long start = System.currentTimeMillis(); + bean.refreshAttributes(); + //System.out.println((System.currentTimeMillis() - start) + "ms to refresh " + bean.getBeanName().toString()); + } + } + } + + // Now refresh the components on the dashboard giving them a chance to use the data refreshContainer(this.rootContainer); } *************** *** 194,197 **** --- 211,215 ---- public static void main(String[] args) { JFrame frame = new JFrame(); + frame.setBackground(Color.gray); frame.getContentPane().add(new RefreshControlComponent()); Index: AttributeTablePopupComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/AttributeTablePopupComponent.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** AttributeTablePopupComponent.java 14 Mar 2005 16:05:38 -0000 1.4 --- AttributeTablePopupComponent.java 12 Apr 2006 17:28:37 -0000 1.4.2.1 *************** *** 17,33 **** package org.mc4j.console.dashboard.components; - import org.openide.util.HelpCtx; - import org.openide.util.actions.SystemAction; - import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.bean.OperationListAction; ! import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; - import javax.swing.JPopupMenu; - /** * This extension of the AttributeTableComponent offers a popup menu to execute operations --- 17,31 ---- package org.mc4j.console.dashboard.components; import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.bean.OperationListAction; + import org.openide.util.HelpCtx; + import org.openide.util.actions.SystemAction; ! import javax.swing.*; ! import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; /** * This extension of the AttributeTableComponent offers a popup menu to execute operations *************** *** 45,49 **** /* (non-Javadoc) * @see org.mc4j.console.dashboard.components.AttributeTableComponent#init() ! */ public void init() { super.init(); --- 43,47 ---- /* (non-Javadoc) * @see org.mc4j.console.dashboard.components.AttributeTableComponent#init() ! */ public void init() { super.init(); *************** *** 83,87 **** selectedRow = AttributeTablePopupComponent.this.table.convertRowIndexToModel(selectedRow); ! MBeanNode mbeanNode = (MBeanNode) AttributeTablePopupComponent.this.mbeanNodes.get(selectedRow); JPopupMenu popupMenu = new JPopupMenu(); --- 81,85 ---- selectedRow = AttributeTablePopupComponent.this.table.convertRowIndexToModel(selectedRow); ! MBeanNode mbeanNode = (MBeanNode) AttributeTablePopupComponent.this.beanList.get(selectedRow); JPopupMenu popupMenu = new JPopupMenu(); *************** *** 104,108 **** public void actionPerformed(ActionEvent ev) { ! bean.getConnectionNode().browseToMBean(bean.getObjectName()); } --- 102,106 ---- public void actionPerformed(ActionEvent ev) { ! bean.getConnectionNode().browseToMBean(bean.getEmsBean().getBeanName().getCanonicalName()); } --- NEW FILE: TabularDataComponent.java --- /* * Copyright 2002-2005 Greg Hinkle * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mc4j.console.dashboard.components; import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.decorator.AlternateRowHighlighter; import org.jdesktop.swingx.decorator.Highlighter; import org.jdesktop.swingx.decorator.HighlighterPipeline; import org.mc4j.ems.connection.bean.EmsBean; import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import javax.management.openmbean.CompositeData; import javax.management.openmbean.CompositeType; import javax.management.openmbean.TabularData; import javax.swing.*; import javax.swing.table.DefaultTableModel; import java.awt.BorderLayout; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * @author Greg Hinkle (gh...@us...), Dec 20, 2005 * @version $Revision: 1.1.2.1 $($Author: ghinkl $ / $Date: 2006/04/12 17:28:37 $) */ public class TabularDataComponent extends JPanel implements BeanComponent { EmsBean bean; JXTable table; String attributeName; EmsAttribute attribute; TabularDataTableModel model; private boolean refreshable = true; private boolean scrollable = true; public void setBean(EmsBean emsBean) { this.bean = emsBean; } public void setAttributeName(String attributeName) { this.attributeName = attributeName; } public void setContext(Map context) { attribute = bean.getAttribute(attributeName); init(); } public boolean isRefreshable() { return refreshable; } public void setRefreshable(boolean refreshable) { this.refreshable = refreshable; } public boolean isScrollable() { return scrollable; } public void setScrollable(boolean scrollable) { this.scrollable = scrollable; } public void init() { table = new JXTable(); table.setColumnControlVisible(true); this.table.setHighlighters(new HighlighterPipeline(new Highlighter[]{new AlternateRowHighlighter()})); setLayout(new BorderLayout()); if (isScrollable()) add(new JScrollPane(table), BorderLayout.CENTER); else add(table,BorderLayout.CENTER); } public void refresh() { if (model != null && !isRefreshable()) return; TabularData d = (TabularData) attribute.refresh(); if (d != null) { if (model == null) { model = new TabularDataTableModel(d); model.setData((TabularData) attribute.refresh()); table.setModel(model); } else { model.setData((TabularData) attribute.refresh()); } } } public static class TabularDataTableModel extends DefaultTableModel { TabularData data; List<CompositeData> values; List<Object> columnKeys; public TabularDataTableModel(TabularData data) { this.data = data; CompositeType rowType = data.getTabularType().getRowType(); setColumnCount(rowType.keySet().size() + 1); //setColumnMetaData(0,new MetaData("index",String.class,"Index")); int n = 1; for (Object cn : rowType.keySet()) { String columnName = (String) cn; String className = rowType.getType(columnName).getClassName(); Class type = null; try { type = Class.forName(className); } catch (ClassNotFoundException e) { } //MetaData metaData = new MetaData(columnName, type == null ? String.class : type, rowType.getDescription(columnName)); //setColumnMetaData(n++, metaData); } setData(data); } public void setData(TabularData data) { this.data = data; //noinspection unchecked this.values = new ArrayList<CompositeData>(this.data.values()); this.columnKeys = new ArrayList<Object>(this.data.getTabularType().getRowType().keySet()); fireTableDataChanged(); } public int getRowCount() { return data == null ? 0 : data.size(); } public Object getValueAt(int row, int col) { return values.get(row).get(String.valueOf(columnKeys.get(col))); } public int getColumnCount() { return (columnKeys == null) ? 0 : columnKeys.size(); } public String getColumnName(int column) { return (columnKeys == null) ? "" : String.valueOf(columnKeys.get(column)); } public boolean isCellEditable(int i, int i1) { return false; } } } Index: BeanListComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/BeanListComponent.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** BeanListComponent.java 5 Oct 2004 05:16:00 -0000 1.2 --- BeanListComponent.java 12 Apr 2006 17:28:37 -0000 1.2.2.1 *************** *** 17,23 **** package org.mc4j.console.dashboard.components; - import java.util.List; - import org.mc4j.console.dashboard.DashboardComponent; /** --- 17,24 ---- package org.mc4j.console.dashboard.components; import org.mc4j.console.dashboard.DashboardComponent; + import org.mc4j.ems.connection.bean.EmsBean; + + import java.util.List; /** *************** *** 36,39 **** * @param beanList */ ! void setBeanList(List beanList); } --- 37,40 ---- * @param beanList */ ! void setBeanList(List<EmsBean> beanList); } Index: MBeanTreeComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/MBeanTreeComponent.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** MBeanTreeComponent.java 5 Oct 2004 05:16:00 -0000 1.7 --- MBeanTreeComponent.java 12 Apr 2006 17:28:37 -0000 1.7.2.1 *************** *** 41,45 **** getExplorerManager().setRootContext(node); ! setName(node.getObjectName().getCanonicalName()); doLayout(); --- 41,45 ---- getExplorerManager().setRootContext(node); ! setName(node.getEmsBean().getBeanName().getCanonicalName()); doLayout(); --- NEW FILE: ErrorComponent.java --- /* * Copyright 2002-2004 Greg Hinkle * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mc4j.console.dashboard.components; import org.openide.ErrorManager; import javax.swing.*; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; /** * Created: Jun 24, 2005 2:04:35 PM * * @author Greg Hinkle (gh...@us...) * @version $Revision: 1.1.2.1 $($Author: ghinkl $ / $Date: 2006/04/12 17:28:37 $) */ public class ErrorComponent extends JOptionPane { public ErrorComponent(final Exception e) { super("Error loading component: " + e.getMessage() , JOptionPane.ERROR_MESSAGE, JOptionPane.DEFAULT_OPTION, null, new String[] { "Display" }); addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { ErrorManager.getDefault().notify(ErrorManager.USER,e); } }); } } Index: ForEachPanelComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/ForEachPanelComponent.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** ForEachPanelComponent.java 5 Oct 2004 05:16:00 -0000 1.2 --- ForEachPanelComponent.java 12 Apr 2006 17:28:37 -0000 1.2.2.1 *************** *** 17,25 **** package org.mc4j.console.dashboard.components; import java.util.List; import java.util.Map; - import javax.swing.JPanel; - /** * Supports a for-each iteration of a set of beans --- 17,26 ---- package org.mc4j.console.dashboard.components; + import org.mc4j.ems.connection.bean.EmsBean; + + import javax.swing.*; import java.util.List; import java.util.Map; /** * Supports a for-each iteration of a set of beans *************** *** 30,34 **** public class ForEachPanelComponent extends JPanel implements BeanListComponent { ! protected List mbeanNodes; protected String idKey; --- 31,35 ---- public class ForEachPanelComponent extends JPanel implements BeanListComponent { ! protected List<EmsBean> beanList; protected String idKey; *************** *** 36,39 **** --- 37,43 ---- protected boolean sorted = false; + public ForEachPanelComponent() { + + } public void init() { *************** *** 55,71 **** ! public void setBeanList(List list) { ! this.mbeanNodes = list; } ! public List getBeanList() { ! return mbeanNodes; } public void setContext(Map context) { ! if (this.mbeanNodes == null) { throw new IllegalStateException( ! "AttributeTableComponent: You must specify an appropriate [beanList] attribute."); } init(); --- 59,75 ---- ! public void setBeanList(List<EmsBean> list) { ! this.beanList = list; } ! public List<EmsBean> getBeanList() { ! return beanList; } public void setContext(Map context) { ! if (this.beanList == null) { throw new IllegalStateException( ! "ForEachPanelComponent: You must specify an appropriate [beanList] attribute."); } init(); Index: AttributeTreeTableExplorer.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/AttributeTreeTableExplorer.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** AttributeTreeTableExplorer.java 5 Oct 2004 05:16:00 -0000 1.4 --- AttributeTreeTableExplorer.java 12 Apr 2006 17:28:37 -0000 1.4.2.1 *************** *** 17,21 **** package org.mc4j.console.dashboard.components; ! import org.mc4j.console.bean.MBeanNode; import org.openide.explorer.ExplorerManager; import org.openide.explorer.ExplorerUtils; --- 17,21 ---- package org.mc4j.console.dashboard.components; ! import org.mc4j.ems.connection.bean.EmsBean; import org.openide.explorer.ExplorerManager; import org.openide.explorer.ExplorerUtils; *************** *** 44,48 **** private Lookup lookup; ! private MBeanNode beanNode; private TreeTableView treeView; --- 44,48 ---- private Lookup lookup; ! private EmsBean emsBean; private TreeTableView treeView; *************** *** 111,123 **** } ! public void setBeanNode(MBeanNode node) { ! this.beanNode = node; } public void setContext(Map context) { ! if (this.beanNode == null) { throw new IllegalStateException( ! "AttributeTreeTableExplorer: context atribute [beanNode] not set."); } --- 111,123 ---- } ! public void setBean(EmsBean emsBean) { ! this.emsBean = emsBean; } public void setContext(Map context) { ! if (this.emsBean == null) { throw new IllegalStateException( ! "AttributeTreeTableExplorer: context atribute [bean] not set."); } *************** *** 166,187 **** ! this.manager.setRootContext(this.beanNode.getAttributesNode()); SwingUtilities.invokeLater(new Runnable() { public void run() { ! setDisplayName(AttributeTreeTableExplorer.this.beanNode.getName()); } }); // TODO GH: This is just a rough guestimate... can we determine font-heights or maximum node-line heights? ! int heightNeeded = (18 * this.beanNode.getAttributesNode().getChildren().getNodes().length) + 50; ! setPreferredSize(new Dimension(getWidth(), heightNeeded)); ! setMaximumSize(new Dimension(Integer.MAX_VALUE, heightNeeded)); } public void refresh() { ! this.beanNode.retrieveData(); } --- 166,187 ---- ! // this.manager.setRootContext(this.emsBean.getAttributesNode()); SwingUtilities.invokeLater(new Runnable() { public void run() { ! // setDisplayName(AttributeTreeTableExplorer.this.emsBean.getName()); } }); // TODO GH: This is just a rough guestimate... can we determine font-heights or maximum node-line heights? ! // int heightNeeded = (18 * this.emsBean.getAttributesNode().getChildren().getNodes().length) + 50; ! // setPreferredSize(new Dimension(getWidth(), heightNeeded)); ! // setMaximumSize(new Dimension(Integer.MAX_VALUE, heightNeeded)); } public void refresh() { ! // this.emsBean.retrieveData(); } Index: NumericAttributeGraph.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/NumericAttributeGraph.java,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -C2 -d -r1.13 -r1.13.2.1 *** NumericAttributeGraph.java 5 Oct 2004 05:16:00 -0000 1.13 --- NumericAttributeGraph.java 12 Apr 2006 17:28:37 -0000 1.13.2.1 *************** *** 17,33 **** package org.mc4j.console.dashboard.components; - import java.util.ArrayList; - import java.util.HashSet; - import java.util.List; - import java.util.Map; - import java.util.Set; - - import javax.management.MBeanAttributeInfo; - import javax.management.MBeanServer; - import javax.management.ObjectName; - - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.attribute.AttributeGraphPanel; import org.mc4j.console.dashboard.DashboardComponent; /** --- 17,25 ---- package org.mc4j.console.dashboard.components; import org.mc4j.console.dashboard.DashboardComponent; + import org.mc4j.console.swing.graph.AttributeGraphPanel; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; + + import java.util.Map; /** *************** *** 36,52 **** * @version $Revision$($Author$ / $Date$) */ ! public class NumericAttributeGraph extends AttributeGraphPanel implements BeanComponent { ! ! protected Set attributeSet = new HashSet(); ! ! protected MBeanNode node; ! ! /* ! public void componentClosed() { ! this.dataGenerator.stop(); ! super.componentClosed(); ! } ! */ ! /** --- 28,32 ---- * @version $Revision$($Author$ / $Date$) */ ! public class NumericAttributeGraph extends AttributeGraphPanel implements DashboardComponent { /** *************** *** 57,61 **** return sleepSlider.getValue(); } - /** * Setter for property updateInterval. --- 37,40 ---- *************** *** 66,123 **** } ! ! ! /** ! * Getter for property currentAttributeName. ! * @return Value of property currentAttributeName. ! */ ! public java.lang.String getAttributeName() { ! return "Multivalue attribute"; } ! /** ! * Setter for property currentAttributeName. ! * @param attributeName New value of property currentAttributeName. ! */ ! public void setAttributeName(java.lang.String attributeName) { ! this.attributeSet.add(attributeName); ! } public void refresh() { } - public void setBeanNode(MBeanNode mBeanNode) { - this.node = mBeanNode; - } public void setContext(Map context) { ! if (node == null) { ! throw new IllegalStateException( ! "NumericAttributeGraph: context atribute [beanNode] not set."); ! } ! ! ObjectName objectName = node.getObjectName(); ! MBeanAttributeInfo[] completeAttributeInfo = node.getMBeanInfo().getAttributes(); ! MBeanServer server = node.getMBeanServer(); ! ! ! this.objectName = objectName; ! this.server = server; ! ! List attList = new ArrayList(); ! for (int i = 0; i < completeAttributeInfo.length; i++) { ! if (this.attributeSet.contains(completeAttributeInfo[i].getName())) { ! attList.add(completeAttributeInfo[i]); ! createTimeSeries(completeAttributeInfo[i].getName(), completeAttributeInfo[i]); ! } ! } ! ! this.attributeInfo = (MBeanAttributeInfo[]) attList.toArray(new MBeanAttributeInfo[attList.size()]); ! ! setChartTitle(createName()); reschedule(); --- 45,67 ---- } + public void setAttribute(EmsAttribute attribute) { + addAttribute(attribute); + } ! public EmsAttribute getAttributeName() { ! return null; } ! public void refresh() { } public void setContext(Map context) { ! //setChartTitle("??"); reschedule(); Index: NumericAttributeGaugeMeter.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/NumericAttributeGaugeMeter.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** NumericAttributeGaugeMeter.java 18 Dec 2004 22:25:59 -0000 1.11 --- NumericAttributeGaugeMeter.java 12 Apr 2006 17:28:37 -0000 1.11.2.1 *************** *** 17,40 **** package org.mc4j.console.dashboard.components; - import java.awt.BorderLayout; - import java.awt.Color; - import java.awt.Font; - import java.awt.Insets; - import java.util.Map; - - import javax.management.MBeanServer; - import javax.management.ObjectName; - import javax.swing.JPanel; - - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.swing.graph.MeterCanvas; - import org.mc4j.console.util.unit.UnitConverter; - import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; ! import org.jfree.chart.MeterLegend; import org.jfree.chart.plot.MeterPlot; - import org.jfree.data.DefaultValueDataset; import org.jfree.data.Range; /** --- 17,37 ---- package org.mc4j.console.dashboard.components; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; ! import org.jfree.chart.plot.DialShape; import org.jfree.chart.plot.MeterPlot; import org.jfree.data.Range; + import org.jfree.data.general.DefaultValueDataset; + import org.jfree.ui.RectangleInsets; + im... [truncated message content] |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:13
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/dashboard Modified Files: Tag: ems_module_separation AttributeFactory.java BorderFactory.java Dashboard.java DashboardComponentFactory.java DashboardFactory.java DashboardLoader.java DashboardManager.java DashboardTopComponent.java Added Files: Tag: ems_module_separation DashboardContainer.java Removed Files: Tag: ems_module_separation DashboardHolder.java Tester.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: DashboardManager.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardManager.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** DashboardManager.java 5 Oct 2004 05:16:01 -0000 1.4 --- DashboardManager.java 12 Apr 2006 17:28:38 -0000 1.4.2.1 *************** *** 20,26 **** --- 20,30 ---- import org.openide.modules.InstalledFileLocator; import org.openide.windows.IOProvider; + import org.openide.windows.TopComponent; + import org.openide.nodes.Node; + import org.openide.ErrorManager; import org.mc4j.console.bean.MBeanNode; + import javax.swing.*; import java.io.File; import java.io.FileFilter; *************** *** 42,48 **** public class DashboardManager { ! ! private Set dashboardDocuments = new TreeSet(); ! private static DashboardManager INSTANCE = new DashboardManager(); --- 46,52 ---- public class DashboardManager { ! ! private Set<Dashboard> dashboardDocuments = new TreeSet(); ! private static DashboardManager INSTANCE = new DashboardManager(); *************** *** 50,62 **** initialize(); } ! public static DashboardManager getInstance() { return DashboardManager.INSTANCE; } ! public Set getDashboards() { return dashboardDocuments; } ! /** * Retrieves the set of dashboards appropriate for a particular bean --- 54,66 ---- initialize(); } ! public static DashboardManager getInstance() { return DashboardManager.INSTANCE; } ! public Set getDashboards() { return dashboardDocuments; } ! /** * Retrieves the set of dashboards appropriate for a particular bean *************** *** 64,75 **** * @return */ ! public Set getDashboards(MBeanNode mBeanNode) { ! Set results = new TreeSet(); ! Iterator dashboardIterator = this.dashboardDocuments.iterator(); while (dashboardIterator.hasNext()) { Dashboard dashboard = (Dashboard) dashboardIterator.next(); ! ! if (dashboard.matches(mBeanNode)) { results.add(dashboard); } --- 68,79 ---- * @return */ ! public Set<Dashboard> getDashboards(MBeanNode mBeanNode) { ! Set<Dashboard> results = new TreeSet<Dashboard>(); ! Iterator dashboardIterator = this.dashboardDocuments.iterator(); while (dashboardIterator.hasNext()) { Dashboard dashboard = (Dashboard) dashboardIterator.next(); ! ! if (dashboard.matches(mBeanNode.getEmsBean())) { results.add(dashboard); } *************** *** 77,81 **** return results; } ! public final void initialize() { //File dashboardDir = new File("./dashboards"); --- 81,85 ---- return results; } ! public final void initialize() { //File dashboardDir = new File("./dashboards"); *************** *** 106,111 **** List fileList = new ArrayList(); ! File dashboardDir = ! InstalledFileLocator.getDefault().locate("dashboards","org.mc4j.console",false); if (dashboardDir.exists() && dashboardDir.isDirectory()) { --- 110,116 ---- List fileList = new ArrayList(); ! File dashboardDir = new File("dashboards"); ! // InstalledFileLocator.getDefault().locate("dashboards","org.mc4j.console",false); ! if (dashboardDir.exists() && dashboardDir.isDirectory()) { *************** *** 141,143 **** --- 146,172 ---- } + + public void launch(final Dashboard dashboard) { + + + try { + final TopComponent tc = new DashboardTopComponent(dashboard, dashboard.getName()); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + // tc.setActivatedNodes(new Node[] { node }); + tc.setDisplayName(dashboard.getName()); + tc.open(); + tc.requestActive(); + } + }); + + // TODO: Is this done in the launchers? + // node.getConnectionNode().registerDashboard(tc); + } catch (Exception e) { + ErrorManager.getDefault().notify(e); + } + + + } + } --- DashboardHolder.java DELETED --- Index: AttributeFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/AttributeFactory.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** AttributeFactory.java 5 Oct 2004 05:16:01 -0000 1.8 --- AttributeFactory.java 12 Apr 2006 17:28:38 -0000 1.8.2.1 *************** *** 17,37 **** package org.mc4j.console.dashboard; ! import java.beans.PropertyDescriptor; ! import java.beans.PropertyEditor; ! import java.beans.PropertyEditorManager; ! import java.util.Map; ! ! import javax.swing.JComponent; ! import org.openide.ErrorManager; import org.openide.windows.IOProvider; - - import org.mc4j.console.dashboard.context.ContextHelper; - import org.mc4j.console.util.BeanUtil; - import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * --- 17,34 ---- package org.mc4j.console.dashboard; ! import org.mc4j.console.dashboard.context.OgnlHelper; ! import org.mc4j.console.util.BeanUtil; import org.openide.ErrorManager; import org.openide.windows.IOProvider; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; + import javax.swing.*; + import java.beans.PropertyDescriptor; + import java.beans.PropertyEditor; + import java.beans.PropertyEditorManager; + import java.util.Map; + /** * *************** *** 41,85 **** public class AttributeFactory { ! public static void loadAttributes(Element parent, Object object, Map context) { NodeList children = parent.getChildNodes(); for (int j = 0; j < children.getLength(); j++) { Node childNode = children.item(j); if ("Attribute".equals(childNode.getNodeName())) { ! setAttribute((Element)childNode, object, context); } } } ! private static void setAttribute(Element attribute, Object object, Map context) { String name = attribute.getAttribute("name"); String valueString = attribute.getAttribute("value"); try { ! Object value = null; ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Introspecting: " + object.getClass().getName() + ", name = " + name + ", value = " + valueString); ! PropertyDescriptor desc = BeanUtil.getPropertyDescriptor(name, object.getClass()); if ((valueString == null) || (valueString.length() < 1) || (JComponent.class.isAssignableFrom(desc.getPropertyType()))) { ! // Use content Element childComponentElement = DashboardFactory.findChild(attribute, "Component"); ! ! DashboardFactory factory = new DashboardFactory(); ! ! JComponent childComponent = factory.buildV1Component(childComponentElement, context); ! ! value = childComponent; } else { ! try { ! //IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Checking context for value: " + valueString); ! value = ContextHelper.getValue(valueString, context); ! //IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Got back: " + value); ! } catch (RuntimeException re) { ! ErrorManager.getDefault().notify(re); } ! ! if (value instanceof String) { valueString = (String) value; try { --- 38,96 ---- public class AttributeFactory { ! public static void loadAttributes(Element parent, Object component, Map context) { NodeList children = parent.getChildNodes(); for (int j = 0; j < children.getLength(); j++) { Node childNode = children.item(j); if ("Attribute".equals(childNode.getNodeName())) { ! setAttribute((Element)childNode, component, context); } } } ! private static void setAttribute(Element attribute, Object component, Map context) { String name = attribute.getAttribute("name"); String valueString = attribute.getAttribute("value"); + try { ! ! Object value = null; ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Introspecting: " + component.getClass().getName() + ", name = " + name + ", value = " + valueString); ! PropertyDescriptor desc = BeanUtil.getPropertyDescriptor(name, component.getClass()); if ((valueString == null) || (valueString.length() < 1) || (JComponent.class.isAssignableFrom(desc.getPropertyType()))) { ! // In these cases, we're looking at the contents of the attribute tag not the xml attributes Element childComponentElement = DashboardFactory.findChild(attribute, "Component"); ! if (childComponentElement != null) { ! // This is an object attribute that happens to take a component as its type ! DashboardFactory factory = new DashboardFactory(); ! ! value = factory.buildV1Component(childComponentElement, context); ! } else { ! // We're going to assume the actual tag content is what we want ! // Set it as a string ! value = attribute.getTextContent(); ! ! } } else { ! ! // If the user marks it a literal, don't use Ognl ! String literal = attribute.getAttribute("literal"); ! if (literal != null && Boolean.valueOf(literal)) { ! value = valueString; ! } else { ! // We're going to try and figure out the value ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Checking context for value: " + valueString); ! value = OgnlHelper.getValue(valueString, context, component, desc.getPropertyType()); ! //ContextHelper.getValue(valueString, context); Old way ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Got back: " + value); } ! ! // This is a second chance to convert values using the PropertyEditor system... ! // Shouldn't be necessary... but hey, its cheap to try if we're not ! if (value instanceof String && desc.getPropertyType() != String.class) { valueString = (String) value; try { *************** *** 89,93 **** } catch (IllegalArgumentException iae) { // Perhaps its a constant? ! Object constValue = BeanUtil.getStaticFieldValue(object.getClass(),valueString); if (constValue != null) value = constValue; --- 100,104 ---- } catch (IllegalArgumentException iae) { // Perhaps its a constant? ! Object constValue = BeanUtil.getStaticFieldValue(component.getClass(),valueString); if (constValue != null) value = constValue; *************** *** 96,104 **** } ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Setting attribute [" + name + "] = [" + value + "] on object: " + object); ! BeanUtil.setObjectAttribute(object, name, value); } catch (Exception e) { ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("*** Exception while setting attribute [" + name + "] = [" + valueString + "] on object: " + object); ErrorManager.getDefault().notify(e); --- 107,115 ---- } ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Setting attribute [" + name + "] = [" + value + "] on object: " + component); ! BeanUtil.setObjectAttribute(component, name, value); } catch (Exception e) { ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("*** Exception while setting attribute [" + name + "] = [" + valueString + "] on object: " + component); ErrorManager.getDefault().notify(e); --- Tester.java DELETED --- Index: DashboardComponentFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardComponentFactory.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** DashboardComponentFactory.java 13 Oct 2004 04:59:37 -0000 1.11 --- DashboardComponentFactory.java 12 Apr 2006 17:28:38 -0000 1.11.2.1 *************** *** 17,37 **** package org.mc4j.console.dashboard; ! import java.awt.Color; ! import java.awt.Graphics; ! import java.awt.Graphics2D; ! import java.awt.RenderingHints; ! import java.util.Map; ! ! import javax.swing.JComponent; ! import javax.swing.JEditorPane; ! import javax.swing.JLabel; ! import javax.swing.JScrollPane; ! import org.openide.windows.IOProvider; - - import org.mc4j.console.util.ExceptionUtility; - import org.w3c.dom.Element; /** * --- 17,28 ---- package org.mc4j.console.dashboard; ! import org.mc4j.console.dashboard.components.ErrorComponent; import org.openide.windows.IOProvider; import org.w3c.dom.Element; + import javax.swing.*; + import java.awt.*; + import java.util.Map; + /** * *************** *** 70,77 **** AttributeFactory.loadAttributes(node, component, context); - if (component instanceof DashboardComponent) { - ((DashboardComponent)component).setContext(context); - } if (component instanceof JScrollPane) { ((JScrollPane)component).getVerticalScrollBar().setUnitIncrement(10); --- 61,66 ---- AttributeFactory.loadAttributes(node, component, context); + // This is a hack to improve the usability of the scrollwheel... could be intelligent if (component instanceof JScrollPane) { ((JScrollPane)component).getVerticalScrollBar().setUnitIncrement(10); *************** *** 86,92 **** } catch (Exception e) { System.out.println(e); ! JEditorPane errorPane = new JEditorPane("text/plain", ExceptionUtility.printStackTracesToString(e)); ! errorPane.setBackground(Color.yellow); ! return errorPane; } } --- 75,82 ---- } catch (Exception e) { System.out.println(e); ! // JEditorPane errorPane = new JEditorPane("text/plain", ExceptionUtility.printStackTracesToString(e)); ! // errorPane.setBackground(Color.yellow); ! // return errorPane; ! return new ErrorComponent(e); } } Index: BorderFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/BorderFactory.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** BorderFactory.java 5 Oct 2004 05:16:01 -0000 1.8 --- BorderFactory.java 12 Apr 2006 17:28:38 -0000 1.8.2.1 *************** *** 17,20 **** --- 17,29 ---- package org.mc4j.console.dashboard; + import ognl.OgnlException; + import org.mc4j.console.dashboard.context.OgnlHelper; + import org.mc4j.console.util.BeanUtil; + import org.openide.ErrorManager; + import org.openide.windows.IOProvider; + import org.w3c.dom.Element; + + import javax.swing.border.Border; + import javax.swing.border.TitledBorder; import java.awt.Color; import java.beans.PropertyEditor; *************** *** 22,36 **** import java.util.Map; - import javax.swing.border.Border; - import javax.swing.border.TitledBorder; - - import org.openide.ErrorManager; - import org.openide.windows.IOProvider; - - import org.mc4j.console.dashboard.context.ContextHelper; - import org.mc4j.console.util.BeanUtil; - - import org.w3c.dom.Element; - /** * --- 31,34 ---- *************** *** 39,54 **** */ public class BorderFactory { ! /** Creates a new instance of ConstraintFactory */ public BorderFactory() { } ! public static final String TYPE = "type"; ! public Border buildBorder(Element element, Map context) { ! String type = element.getAttribute(TYPE); if (type.equals("javax.swing.border.TitledBorder")) { ! TitledBorder border = new TitledBorder("Initial"); return border; --- 37,52 ---- */ public class BorderFactory { ! /** Creates a new instance of ConstraintFactory */ public BorderFactory() { } ! public static final String TYPE = "type"; ! public Border buildBorder(Element element, Map context) { ! String type = element.getAttribute(TYPE); if (type.equals("javax.swing.border.TitledBorder")) { ! TitledBorder border = new TitledBorder("Initial"); return border; *************** *** 100,106 **** try { ! value = ContextHelper.getValue(attributeString, context); ! } catch (RuntimeException re) { ! ErrorManager.getDefault().notify(re); } --- 98,105 ---- try { ! value = OgnlHelper.getValue(attributeString, context, attributeType); ! //ContextHelper.getValue(attributeString, context); ! } catch (OgnlException oe) { ! ErrorManager.getDefault().notify(oe); } *************** *** 109,114 **** try { PropertyEditor editor = PropertyEditorManager.findEditor(attributeType); ! editor.setAsText(valueString); ! value = editor.getValue(); } catch (IllegalArgumentException iae) { // Perhaps its a constant? --- 108,118 ---- try { PropertyEditor editor = PropertyEditorManager.findEditor(attributeType); ! // TODO: Figure out why there are missing primitive property editors ! if (editor != null) { ! editor.setAsText(valueString); ! value = editor.getValue(); ! } else { ! value = null; ! } } catch (IllegalArgumentException iae) { // Perhaps its a constant? Index: DashboardLoader.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardLoader.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** DashboardLoader.java 15 Jan 2005 03:51:07 -0000 1.8 --- DashboardLoader.java 12 Apr 2006 17:28:38 -0000 1.8.2.1 *************** *** 84,89 **** --- 84,115 ---- document); + String val = rootElement.getAttribute("standardHeader"); + if (val != null && Boolean.valueOf(val)) { + dashboard.setStandardHeader(true); + } + + val = rootElement.getAttribute("refreshControl"); + if (val != null && val.length() > 0) { + if (Character.isDigit(val.charAt(0))) { + int time = Integer.parseInt(val); + dashboard.setRefreshControl(true); + dashboard.setRefreshTime(time); + } else { + dashboard.setRefreshControl(Boolean.valueOf(val)); + } + } else { + dashboard.setRefreshControl(true); + } + + val = rootElement.getAttribute("autoRefresh"); + if (val != null && Boolean.valueOf(val)) { + dashboard.setAutoBeanRefresh(true); + } + + dashboard.setDescription(rootElement.getElementsByTagName("Description").item(0).getNodeValue()); + dashboard.putContext(Dashboard.CONTEXT_DASHBOARD_FILE, dashboardFile); + assignDashboardMatch(dashboard, rootElement); *************** *** 254,257 **** --- 280,301 ---- inputSource = new InputSource(inputStream); } + } else if ("http://mc4j.org/Dashboard_2_0.dtd".equals(systemId)) { + + InputStream inputStream = + getClass().getClassLoader().getResourceAsStream("dashboards/Dashboard_2_0.dtd"); + + if (inputStream != null) { + inputSource = new InputSource(inputStream); + } + + + } else { + String filePath = "dashboards" + systemId.substring(systemId.lastIndexOf("/")); + InputStream inputStream = + getClass().getClassLoader().getResourceAsStream(filePath); + + if (inputStream != null) { + inputSource = new InputSource(inputStream); + } } if (inputSource != null) { Index: DashboardFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardFactory.java,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -d -r1.15 -r1.15.2.1 *** DashboardFactory.java 13 Oct 2004 04:59:37 -0000 1.15 --- DashboardFactory.java 12 Apr 2006 17:28:38 -0000 1.15.2.1 *************** *** 26,29 **** --- 26,30 ---- import org.mc4j.console.dashboard.components.ForEachPanelComponent; import org.mc4j.console.util.ExceptionUtility; + import org.mc4j.ems.connection.bean.EmsBean; import java.awt.Color; *************** *** 153,157 **** ! if (rootElement.getAttribute("version").equals("1.0")) { NodeList nodes = rootElement.getChildNodes(); --- 154,158 ---- ! if (true) { // maybe use this later rootElement.getAttribute("version").equals("1.0")) { NodeList nodes = rootElement.getChildNodes(); *************** *** 278,282 **** //loadAttributes(node, component, context); ! component.doLayout(); return component; --- 279,288 ---- //loadAttributes(node, component, context); ! ! // Delayed context setting (after children have been loaded ! if (component instanceof DashboardComponent) { ! ((DashboardComponent)component).setContext(context); ! } ! component.doLayout(); return component; *************** *** 288,297 **** Integer baseIndex = (Integer) context.get("index"); ! List beanList = forEachPanelComponent.getBeanList(); for (int i = 0; i < beanList.size(); i++) { ! MBeanNode mBeanNode = (MBeanNode) beanList.get(i); context.put("index", new Integer(i)); ! context.put(forEachPanelComponent.getIdKey(), mBeanNode); buildV1Content(element, context); --- 294,303 ---- Integer baseIndex = (Integer) context.get("index"); ! List<EmsBean> beanList = forEachPanelComponent.getBeanList(); for (int i = 0; i < beanList.size(); i++) { ! EmsBean emsBean = beanList.get(i); context.put("index", new Integer(i)); ! context.put(forEachPanelComponent.getIdKey(), emsBean); buildV1Content(element, context); --- NEW FILE: DashboardContainer.java --- /* * Copyright 2002-2005 Greg Hinkle * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mc4j.console.dashboard; /** * This is the root container panel for dashboards. It is laoded into * * @author Greg Hinkle (gh...@us...), Dec 30, 2005 * @version $Revision: 1.1.2.1 $($Author: ghinkl $ / $Date: 2006/04/12 17:28:38 $) */ public class DashboardContainer { } Index: Dashboard.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/Dashboard.java,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** Dashboard.java 5 Oct 2004 05:16:01 -0000 1.17 --- Dashboard.java 12 Apr 2006 17:28:38 -0000 1.17.2.1 *************** *** 17,25 **** package org.mc4j.console.dashboard; - import org.w3c.dom.Document; - - import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.dashboard.match.DashboardMatch; import org.mc4j.console.dashboard.match.MatchExecutor; import java.util.HashMap; --- 17,24 ---- package org.mc4j.console.dashboard; import org.mc4j.console.dashboard.match.DashboardMatch; import org.mc4j.console.dashboard.match.MatchExecutor; + import org.mc4j.ems.connection.bean.EmsBean; + import org.w3c.dom.Document; import java.util.HashMap; *************** *** 28,35 **** /** * Represents a dashboard that can be invoked for an MBean or server. This is ! * not the dashboard itself, but the data representing a class of dashboard, ! * but not a specific instance. Instances of the dashboards themselves are * created by the DashboardFactory. * * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) --- 27,36 ---- /** * Represents a dashboard that can be invoked for an MBean or server. This is ! * not the dashboard view itself, but the data representing the xml information ! * in a dashboard XML document. Instances of the dashboards themselves are * created by the DashboardFactory. * + * + * * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) *************** *** 56,59 **** --- 57,65 ---- + private boolean standardHeader = false; + private boolean refreshControl = false; + private boolean autoBeanRefresh = false; + private int refreshTime = 5000; + public static final String CONTEXT_CONNECTION_NODE = "ConnectionNode"; public static final String CONTEXT_MBEAN_NODE = "MBeanNode"; *************** *** 65,68 **** --- 71,77 ---- public static final String CONTEXT_DASHBOARD_NAME = "DashboardName"; public static final String CONTEXT_DASHBOARD_DESCRIPTION = "DashboardDescription"; + public static final String CONTEXT_DASHBOARD_FILE = "DashboardFile"; + + public static final String CONTEXT_CONNECTION = "Connection"; public Dashboard( *************** *** 160,166 **** } ! public boolean matches(MBeanNode mBeanNode) { ! return MatchExecutor.getInstance().matchSingle(this, mBeanNode); } } --- 169,207 ---- } ! public boolean matches(EmsBean bean) { ! return MatchExecutor.getInstance().matchSingle(this, bean); ! } ! ! ! public boolean isStandardHeader() { ! return standardHeader; } + public void setStandardHeader(boolean standardHeader) { + this.standardHeader = standardHeader; + } + + public boolean isRefreshControl() { + return refreshControl; + } + + public void setRefreshControl(boolean refreshControl) { + this.refreshControl = refreshControl; + } + + public boolean isAutoBeanRefresh() { + return autoBeanRefresh; + } + + public void setAutoBeanRefresh(boolean autoBeanRefresh) { + this.autoBeanRefresh = autoBeanRefresh; + } + + public int getRefreshTime() { + return refreshTime; + } + + public void setRefreshTime(int refreshTime) { + this.refreshTime = refreshTime; + } } Index: DashboardTopComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardTopComponent.java,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -d -r1.15 -r1.15.2.1 *** DashboardTopComponent.java 5 Oct 2004 05:16:01 -0000 1.15 --- DashboardTopComponent.java 12 Apr 2006 17:28:38 -0000 1.15.2.1 *************** *** 17,20 **** --- 17,22 ---- package org.mc4j.console.dashboard; + import org.mc4j.console.dashboard.components.ErrorComponent; + import org.mc4j.console.dashboard.components.RefreshControlComponent; import org.openide.util.actions.SystemAction; import org.openide.windows.TopComponent; *************** *** 26,41 **** - /** - * * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) */ public class DashboardTopComponent extends TopComponent implements DashboardComponent { ! public DashboardTopComponent() { // For serialization ! putClientProperty("PersistenceType","Never"); ! } --- 28,45 ---- /** * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) */ public class DashboardTopComponent extends TopComponent implements DashboardComponent { ! ! private Dashboard dashboard; ! private String name; ! private JScrollPane scrollPane; ! public DashboardTopComponent() { // For serialization ! putClientProperty("PersistenceType", "Never"); ! } *************** *** 45,80 **** ! // REMEMBER: You should have a public default constructor! ! // This is for externalization. If you have a nondefault ! // constructor for normal creation of the component, leave ! // in a default constructor that will put the component into ! // a consistent but unconfigured state, and make sure readExternal ! // initializes it properly. Or, be creative with writeReplace(). ! public DashboardTopComponent(JComponent component, String name) { ! setLayout(new BorderLayout()); - - add(component,BorderLayout.CENTER); ! //setCloseOperation(CLOSE_EACH); // or CLOSE_EACH ! // Display name of this window (not needed if you use the DataObject constructor): ! // GH: Can't do this outside the event thread anymore ! //setDisplayName(name); ! ! // You may set the icon, but often it is better to set the icon for an associated mode instead: ! // setIcon(Utilities.loadImage("org/mc4j/console/dashboard/DashboardHolderIcon.gif")); ! // Use the Component Inspector to set tool-tip text. This will be saved ! // automatically. Other JComponent properties you may need to save yuorself. ! // At any time you can affect the node selection: ! // setActivatedNodes(new Node[] {...}); ! // Don't ever persist... ! //putClientProperty("PersistenceType","Never"); ! // TODO GH: Get the refresh action connected } public int getPersistenceType() { return TopComponent.PERSISTENCE_NEVER; --- 49,143 ---- ! public DashboardTopComponent(Dashboard dashboard, String name) { ! this.dashboard = dashboard; ! this.name = name; ! ! // Don't ever persist... ! putClientProperty("PersistenceType", "Never"); ! ! // TODO GH: Get the refresh action connected ! init(); ! } ! ! JPanel header; ! ! private void init() { setLayout(new BorderLayout()); ! Map context = dashboard.getContextStarter(); ! DashboardFactory factory = new DashboardFactory(); ! JComponent component = null; ! try { ! component = factory.buildDashboard(dashboard, context); ! } catch (Exception e) { ! component = new ErrorComponent(e); ! } ! if (dashboard.isStandardHeader()) { ! header = new GradientPanel(); ! header.setLayout(new BorderLayout()); ! ! JLabel title = new JLabel(getTitle()) { ! public void paintComponent(Graphics g) { ! Graphics2D g2 = (Graphics2D)g; ! g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, ! RenderingHints.VALUE_ANTIALIAS_ON); ! super.paintComponent(g); ! } ! }; ! ! title.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,6,0,0)); ! header.add(title, BorderLayout.CENTER); ! if (dashboard.isRefreshControl()) { ! RefreshControlComponent refresher = new RefreshControlComponent(); ! refresher.setContext(context); ! refresher.setRefreshDelay(dashboard.getRefreshTime()); ! header.add(refresher, BorderLayout.EAST); ! } ! add(header, BorderLayout.NORTH); ! } ! ! scrollPane = new JScrollPane(component); ! ! add(scrollPane, BorderLayout.CENTER); ! } ! ! public static class GradientPanel extends JPanel { ! public static final Color START = new Color(128, 172, 209); //119,175,208); // 188, 218, 231); ! public static final Color END = new Color(214, 218, 219); ! ! public void paintComponent(Graphics g) { ! super.paintComponent(g); ! // Cast to Graphics2D so we can set composite information. ! Graphics2D g2d = (Graphics2D) g; ! ! g2d.setPaint(new GradientPaint(0, 0, START /* Color.WHITE*/, getWidth()-64, 0, getBackground())); // END)); ! g2d.fill(getVisibleRect()); ! } } + public String getTitle() { + return + "<html><font size=\"+1\">" + + dashboard.getDisplayName() + + "</font><br>" + + dashboard.getDescription() + + "</html>"; + } + + + public void launch() { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + setDisplayName(dashboard.getDisplayName()); + open(); + requestActive(); + } + }); + } + public int getPersistenceType() { return TopComponent.PERSISTENCE_NEVER; *************** *** 88,92 **** - public void setContext(Map context) { //To change body of implemented methods use File | Settings | File Templates. --- 151,154 ---- *************** *** 106,110 **** if (container instanceof DashboardComponent) ! ((DashboardComponent)container).refresh(); } } --- 168,172 ---- if (container instanceof DashboardComponent) ! ((DashboardComponent) container).refresh(); } } *************** *** 113,117 **** private void closeChildren(Component comp) { if (comp instanceof Container) { ! Component[] children = ((Container)comp).getComponents(); for (int i = 0; i < children.length; i++) { Component child = children[i]; --- 175,179 ---- private void closeChildren(Component comp) { if (comp instanceof Container) { ! Component[] children = ((Container) comp).getComponents(); for (int i = 0; i < children.length; i++) { Component child = children[i]; *************** *** 120,125 **** } if (comp instanceof TopComponent) { ! ((TopComponent)comp).setCloseOperation(CLOSE_EACH); ! ((TopComponent)comp).close(); } } --- 182,187 ---- } if (comp instanceof TopComponent) { ! ((TopComponent) comp).setCloseOperation(CLOSE_EACH); ! ((TopComponent) comp).close(); } } *************** *** 130,136 **** } */ ! // MODES AND WORKSPACES - --- 192,197 ---- } */ ! // MODES AND WORKSPACES *************** *** 155,160 **** - - // Use this to discard the component after restarts (make it nonpersistent): private Object readResolve() throws ObjectStreamException { --- 216,219 ---- *************** *** 192,206 **** } */ ! /* ! // If you want UndoAction and RedoAction to be enabled on this component: ! public UndoRedo getUndoRedo() { ! return new MyUndoRedo(this); ! } ! */ ! // Printing, saving, compiling, etc.: use cookies on some appropriate node and // use this node as the node selection. ! } --- 251,285 ---- } */ ! /* ! // If you want UndoAction and RedoAction to be enabled on this component: ! public UndoRedo getUndoRedo() { ! return new MyUndoRedo(this); ! } ! */ ! // Printing, saving, compiling, etc.: use cookies on some appropriate node and // use this node as the node selection. ! ! ! public static class DashboardHeaderComponent extends JPanel { ! private Label label; ! private RefreshControlComponent refreshControl; ! ! public DashboardHeaderComponent() { ! setLayout(new BorderLayout()); ! } ! ! private void init() { ! setLayout(new BorderLayout()); ! ! setLayout(new java.awt.BorderLayout()); ! label = new Label("<html><font size=\"+1\">Garbage Collection</font><br>Information about the various garbage collectors for the VM, including space collected during the last execution.</html> "); ! add(label, java.awt.BorderLayout.CENTER); ! ! refreshControl = new RefreshControlComponent(); ! // add(jToggleButton1, java.awt.BorderLayout.EAST); ! } ! } } |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:13
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/tracker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/bean/notification/tracker Modified Files: Tag: ems_module_separation NotificationTracker.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: NotificationTracker.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/tracker/NotificationTracker.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** NotificationTracker.java 5 Oct 2004 05:15:56 -0000 1.4 --- NotificationTracker.java 12 Apr 2006 17:28:36 -0000 1.4.2.1 *************** *** 17,25 **** package org.mc4j.console.bean.notification.tracker; import org.openide.windows.Mode; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; - import javax.management.Notification; import javax.swing.*; import javax.swing.table.DefaultTableModel; --- 17,25 ---- package org.mc4j.console.bean.notification.tracker; + import org.mc4j.ems.connection.bean.notification.EmsNotificationEvent; import org.openide.windows.Mode; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; import javax.swing.*; import javax.swing.table.DefaultTableModel; *************** *** 78,89 **** } ! public void addNotification(Notification notif) { // message, sequence #, source, timestamp, type, userdata this.model.addRow( new Object[] { notif.getMessage(), ! new Long(notif.getSequenceNumber()), notif.getSource(), ! new Long(notif.getTimeStamp()), notif.getType(), notif.getUserData() --- 78,89 ---- } ! public void addNotification(EmsNotificationEvent notif) { // message, sequence #, source, timestamp, type, userdata this.model.addRow( new Object[] { notif.getMessage(), ! notif.getSequenceNumber(), notif.getSource(), ! notif.getTimeStamp(), notif.getType(), notif.getUserData() |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:11
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/cluster In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/src/org/mc4j/console/cluster Modified Files: Tag: ems_module_separation ClusterAddConnectionAction.java ClusterConnection.java Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: ClusterAddConnectionAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/cluster/ClusterAddConnectionAction.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** ClusterAddConnectionAction.java 5 Oct 2004 05:15:57 -0000 1.8 --- ClusterAddConnectionAction.java 12 Apr 2006 17:28:36 -0000 1.8.2.1 *************** *** 17,24 **** package org.mc4j.console.cluster; ! import java.awt.Dialog; ! ! import javax.swing.SwingUtilities; ! import org.openide.DialogDisplayer; import org.openide.ErrorManager; --- 17,22 ---- package org.mc4j.console.cluster; ! import org.mc4j.console.connection.wizard.ConnectionDescriptor; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.DialogDisplayer; import org.openide.ErrorManager; *************** *** 28,33 **** import org.openide.util.actions.NodeAction; ! import org.mc4j.console.connection.persistence.ConnectionSettings; ! import org.mc4j.console.connection.wizard.ConnectionDescriptor; /** --- 26,31 ---- import org.openide.util.actions.NodeAction; ! import javax.swing.*; ! import java.awt.*; /** Index: ClusterConnection.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/cluster/ClusterConnection.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** ClusterConnection.java 5 Oct 2004 05:15:57 -0000 1.7 --- ClusterConnection.java 12 Apr 2006 17:28:37 -0000 1.7.2.1 *************** *** 17,32 **** package org.mc4j.console.cluster; ! import java.util.ArrayList; ! import java.util.Iterator; ! import java.util.List; ! ! import javax.management.MBeanServer; ! ! import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.util.actions.SystemAction; ! import org.mc4j.console.connection.ConnectionNode; ! import org.mc4j.console.connection.persistence.ConnectionSettings; /** --- 17,28 ---- package org.mc4j.console.cluster; ! import org.mc4j.console.connection.ConnectionNode; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.nodes.Node; import org.openide.util.actions.SystemAction; ! import java.util.ArrayList; ! import java.util.Iterator; ! import java.util.List; /** *************** *** 43,47 **** /** Creates a new instance of ClusterConnection */ public ClusterConnection() { ! super(new Children.Array()); setIconBase("org/mc4j/console/connection/DisconnectedConnectionNodeIcon"); --- 39,43 ---- /** Creates a new instance of ClusterConnection */ public ClusterConnection() { ! super(new ConnectionSettings()); setIconBase("org/mc4j/console/connection/DisconnectedConnectionNodeIcon"); *************** *** 69,72 **** --- 65,69 ---- public void initialize(ConnectionSettings settings) { } + public Node.PropertySet[] getPropertySets() { *************** *** 84,91 **** } } ! ! public MBeanServer getMBeanServer() { ! return null; ! } } --- 81,85 ---- } } ! } |
From: Greg H. <gh...@us...> - 2006-04-12 17:29:11
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/chires In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/application/dashboards/chires Modified Files: Tag: ems_module_separation Chires_JDBCQueryStats.xml Chires_Profiler.xml Log Message: Lots of changes towards the 2.0 alpha that I should've checked in a long time ago. Lots of stuff still broken. Only JBoss and JDK 1.5 have been tested. Index: Chires_JDBCQueryStats.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/chires/Chires_JDBCQueryStats.xml,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** Chires_JDBCQueryStats.xml 19 Jan 2005 14:17:02 -0000 1.2 --- Chires_JDBCQueryStats.xml 12 Apr 2006 17:28:33 -0000 1.2.2.1 *************** *** 1,6 **** <?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="JDBC Queries"> <Description>This dashboard shows the statistics of JDBC calls through connection to Chires.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="JDBC Queries" standardHeader="true" refreshControl="true"> <Description>This dashboard shows the statistics of JDBC calls through connection to Chires.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Chires/JDBC"> <BeanMatch id="JDBCModel" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="Chires.*type=JDBCModel.*"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Chires/JDBC"> <BeanMatch id="JDBCModel" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="Chires.*type=JDBCModel.*"/> </BeanMatch> </DashboardMatch> *************** *** 15,49 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <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)5000"/> - </Component> - </Content> - </Component> --- 15,18 ---- Index: Chires_Profiler.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/chires/Chires_Profiler.xml,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** Chires_Profiler.xml 19 Jan 2005 14:17:02 -0000 1.1 --- Chires_Profiler.xml 12 Apr 2006 17:28:33 -0000 1.1.2.1 *************** *** 1,6 **** <?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="Chires Profiler"> <Description>The Chires Profiler view.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Chires Profiler" standardHeader="true" refreshControl="true"> <Description>The Chires Profiler view.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Chires/Profile"> <BeanMatch id="FlowModel" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="Chires.*type=FlowModel.*"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Chires/Profile"> <BeanMatch id="FlowModel" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="Chires.*type=FlowModel.*"/> </BeanMatch> </DashboardMatch> *************** *** 15,50 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <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)5000"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.chires.components.flow.ProfilerViewComponent"> --- 15,18 ---- |