[Ejtools-cvs] applications/jmx.browser/src/main/org/ejtools/jmx/browser/state/rules GraphInternalFra
Brought to you by:
letiemble
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/state/rules
In directory sc8-pr-cvs1:/tmp/cvs-serv11709/jmx.browser/src/main/org/ejtools/jmx/browser/state/rules
Modified Files:
GraphInternalFrameRule.java ResourceGraphRule.java
ResourceRule.java ServerInternalFrameRule.java ServerRule.java
Log Message:
Add more javadocs.
Adjust some things.
Index: GraphInternalFrameRule.java
===================================================================
RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/state/rules/GraphInternalFrameRule.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GraphInternalFrameRule.java 27 Nov 2003 01:13:07 -0000 1.1
--- GraphInternalFrameRule.java 13 Dec 2003 22:15:07 -0000 1.2
***************
*** 1,48 ****
! /*
! * Created on 20 juin 2003
! *
! * To change this generated comment go to
! * Window>Preferences>Java>Code Generation>Code Template
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.beans.beancontext.BeanContextServices;
! import java.util.Map;
!
! import org.ejtools.graph.frame.GraphInternalFrame;
! import org.ejtools.util.state.DefaultRule;
! import org.xml.sax.Attributes;
!
! /**
! * @author letiemble
! * @created 20 juin 2003
! * @version $Revision$
! */
! public class GraphInternalFrameRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! BeanContextServices container = (BeanContextServices) context.get("CONTAINER");
!
! GraphInternalFrame frame = new GraphInternalFrame();
! Attributes attrs = (Attributes) context.get("ATTRIBUTES");
!
! String name = attrs.getValue("name");
! frame.setName(name);
!
! String delay = attrs.getValue("delay");
! frame.setName(name);
! frame.setDelay(Long.parseLong(delay));
!
! String scale = attrs.getValue("scale");
! frame.setName(name);
! frame.setScale(Double.parseDouble(scale));
!
! container.add(frame);
! }
! }
--- 1,48 ----
! /*
! * Created on 20 juin 2003
! *
! * To change this generated comment go to
! * Window>Preferences>Java>Code Generation>Code Template
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.beans.beancontext.BeanContextServices;
! import java.util.Map;
!
! import org.ejtools.graph.frame.GraphInternalFrame;
! import org.ejtools.util.state.DefaultRule;
! import org.xml.sax.Attributes;
!
! /**
! * @author letiemble
! * @created 20 juin 2003
! * @version $Revision$
! */
! public class GraphInternalFrameRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! BeanContextServices container = (BeanContextServices) context.get("CONTAINER");
!
! GraphInternalFrame frame = new GraphInternalFrame();
! Attributes attrs = (Attributes) context.get("ATTRIBUTES");
!
! String name = attrs.getValue("name");
! frame.setName(name);
!
! String delay = attrs.getValue("delay");
! frame.setName(name);
! frame.setDelay(Long.parseLong(delay));
!
! String scale = attrs.getValue("scale");
! frame.setName(name);
! frame.setScale(Double.parseDouble(scale));
!
! container.add(frame);
! }
! }
Index: ResourceGraphRule.java
===================================================================
RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/state/rules/ResourceGraphRule.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ResourceGraphRule.java 27 Nov 2003 01:13:07 -0000 1.1
--- ResourceGraphRule.java 13 Dec 2003 22:15:07 -0000 1.2
***************
*** 1,43 ****
! /*
! * Created on 20 juin 2003
! *
! * To change this generated comment go to
! * Window>Preferences>Java>Code Generation>Code Template
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.util.Map;
!
! import org.ejtools.graph.service.GraphConsumer;
! import org.ejtools.graph.service.GraphConsumerSelector;
! import org.ejtools.jmx.browser.model.Resource;
! import org.ejtools.util.state.DefaultRule;
! import org.xml.sax.Attributes;
!
! /**
! * @author letiemble
! * @created 20 juin 2003
! * @version $Revision$
! */
! public class ResourceGraphRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! Resource resource = (Resource) context.get("RESOURCE");
! if (resource != null)
! {
! Attributes attrs = (Attributes) context.get("ATTRIBUTES");
!
! String attribute = attrs.getValue("attribute");
! String target = attrs.getValue("target");
!
! GraphConsumer consumer = GraphConsumerSelector.select(resource, target);
! resource.registerForGraph(consumer, attribute);
! }
! }
! }
--- 1,43 ----
! /*
! * Created on 20 juin 2003
! *
! * To change this generated comment go to
! * Window>Preferences>Java>Code Generation>Code Template
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.util.Map;
!
! import org.ejtools.graph.service.GraphConsumer;
! import org.ejtools.graph.service.GraphConsumerSelector;
! import org.ejtools.jmx.browser.model.Resource;
! import org.ejtools.util.state.DefaultRule;
! import org.xml.sax.Attributes;
!
! /**
! * @author letiemble
! * @created 20 juin 2003
! * @version $Revision$
! */
! public class ResourceGraphRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! Resource resource = (Resource) context.get("RESOURCE");
! if (resource != null)
! {
! Attributes attrs = (Attributes) context.get("ATTRIBUTES");
!
! String attribute = attrs.getValue("attribute");
! String target = attrs.getValue("target");
!
! GraphConsumer consumer = GraphConsumerSelector.select(resource, target);
! resource.registerForGraph(consumer, attribute);
! }
! }
! }
Index: ResourceRule.java
===================================================================
RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/state/rules/ResourceRule.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ResourceRule.java 27 Nov 2003 01:13:07 -0000 1.1
--- ResourceRule.java 13 Dec 2003 22:15:07 -0000 1.2
***************
*** 1,53 ****
! /*
! * Created on 20 juin 2003
! *
! * To change this generated comment go to
! * Window>Preferences>Java>Code Generation>Code Template
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.util.Map;
!
! import org.ejtools.jmx.browser.frame.ServerInternalFrame;
! import org.ejtools.jmx.browser.model.Resource;
! import org.ejtools.util.state.DefaultRule;
! import org.xml.sax.Attributes;
!
! /**
! * @author letiemble
! * @created 20 juin 2003
! * @version $Revision$
! */
! public class ResourceRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME");
! Attributes attrs = (Attributes) context.get("ATTRIBUTES");
!
! String objectName = attrs.getValue("objectName");
! Resource resource = frame.queryMBean(objectName);
! if (resource != null)
! {
! context.put("RESOURCE", resource);
!
! String listen = attrs.getValue("listen");
! if ("true".equals(listen))
! {
! try
! {
! resource.registerForNotifications();
! }
! catch (Exception e)
! {
! e.printStackTrace();
! }
! }
! }
! }
! }
--- 1,53 ----
! /*
! * Created on 20 juin 2003
! *
! * To change this generated comment go to
! * Window>Preferences>Java>Code Generation>Code Template
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.util.Map;
!
! import org.ejtools.jmx.browser.frame.ServerInternalFrame;
! import org.ejtools.jmx.browser.model.Resource;
! import org.ejtools.util.state.DefaultRule;
! import org.xml.sax.Attributes;
!
! /**
! * @author letiemble
! * @created 20 juin 2003
! * @version $Revision$
! */
! public class ResourceRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME");
! Attributes attrs = (Attributes) context.get("ATTRIBUTES");
!
! String objectName = attrs.getValue("objectName");
! Resource resource = frame.queryMBean(objectName);
! if (resource != null)
! {
! context.put("RESOURCE", resource);
!
! String listen = attrs.getValue("listen");
! if ("true".equals(listen))
! {
! try
! {
! resource.registerForNotifications();
! }
! catch (Exception e)
! {
! e.printStackTrace();
! }
! }
! }
! }
! }
Index: ServerInternalFrameRule.java
===================================================================
RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/state/rules/ServerInternalFrameRule.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ServerInternalFrameRule.java 27 Nov 2003 01:13:07 -0000 1.1
--- ServerInternalFrameRule.java 13 Dec 2003 22:15:07 -0000 1.2
***************
*** 1,32 ****
! /*
! * EJTools, the Enterprise Java Tools
! *
! * Distributable under LGPL license.
! * See terms of license at www.gnu.org.
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.util.Map;
!
! import org.ejtools.jmx.browser.frame.ServerInternalFrame;
! import org.ejtools.util.state.DefaultRule;
!
! /**
! * @author letiembl
! * @version $Revision$
! * @created 20 juin 2003
! */
! public class ServerInternalFrameRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! ServerInternalFrame frame = new ServerInternalFrame();
! context.put("FRAME", frame);
! context.put("HOLDER", frame);
! }
! }
--- 1,32 ----
! /*
! * EJTools, the Enterprise Java Tools
! *
! * Distributable under LGPL license.
! * See terms of license at www.gnu.org.
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.util.Map;
!
! import org.ejtools.jmx.browser.frame.ServerInternalFrame;
! import org.ejtools.util.state.DefaultRule;
!
! /**
! * @author letiembl
! * @version $Revision$
! * @created 20 juin 2003
! */
! public class ServerInternalFrameRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! ServerInternalFrame frame = new ServerInternalFrame();
! context.put("FRAME", frame);
! context.put("HOLDER", frame);
! }
! }
Index: ServerRule.java
===================================================================
RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/state/rules/ServerRule.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ServerRule.java 27 Nov 2003 01:13:07 -0000 1.1
--- ServerRule.java 13 Dec 2003 22:15:07 -0000 1.2
***************
*** 1,51 ****
! /*
! * Created on 20 juin 2003
! *
! * To change this generated comment go to
! * Window>Preferences>Java>Code Generation>Code Template
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.beans.beancontext.BeanContextServices;
! import java.util.Map;
!
! import org.ejtools.jmx.browser.frame.ServerInternalFrame;
! import org.ejtools.jmx.browser.model.Server;
! import org.ejtools.util.state.DefaultRule;
! import org.xml.sax.Attributes;
!
! /**
! * @author letiemble
! * @created 20 juin 2003
! * @version $Revision$
! */
! public class ServerRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! BeanContextServices container = (BeanContextServices) context.get("CONTAINER");
! ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME");
!
! Server server = new Server();
! context.put("SERVER", server);
!
! frame.setServer(server);
! container.add(frame);
!
! Attributes attrs = (Attributes) context.get("ATTRIBUTES");
!
! String name = attrs.getValue("name");
! server.setName(name);
!
! String connected = attrs.getValue("connected");
! if ("true".equals(connected))
! {
! server.connect();
! }
! }
! }
--- 1,51 ----
! /*
! * Created on 20 juin 2003
! *
! * To change this generated comment go to
! * Window>Preferences>Java>Code Generation>Code Template
! */
! package org.ejtools.jmx.browser.state.rules;
!
! import java.beans.beancontext.BeanContextServices;
! import java.util.Map;
!
! import org.ejtools.jmx.browser.frame.ServerInternalFrame;
! import org.ejtools.jmx.browser.model.Server;
! import org.ejtools.util.state.DefaultRule;
! import org.xml.sax.Attributes;
!
! /**
! * @author letiemble
! * @created 20 juin 2003
! * @version $Revision$
! */
! public class ServerRule extends DefaultRule
! {
! /**
! * Description of the Method
! *
! * @param context Description of the Parameter
! */
! public void loadEnter(Map context)
! {
! BeanContextServices container = (BeanContextServices) context.get("CONTAINER");
! ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME");
!
! Server server = new Server();
! context.put("SERVER", server);
!
! frame.setServer(server);
! container.add(frame);
!
! Attributes attrs = (Attributes) context.get("ATTRIBUTES");
!
! String name = attrs.getValue("name");
! server.setName(name);
!
! String connected = attrs.getValue("connected");
! if ("true".equals(connected))
! {
! server.connect();
! }
! }
! }
|