org.objectweb.jonas.webapp.jonasadmin
Class MBeanTreeBuilder

java.lang.Object
  extended by org.objectweb.jonas.webapp.jonasadmin.MBeanTreeBuilder
All Implemented Interfaces:
TreeBuilder

public class MBeanTreeBuilder
extends java.lang.Object
implements TreeBuilder

Implementation of TreeBuilder that adds the nodes required for administering the Jonas server.

Author:
Michel-Ange ANTON (initial developer), Florent Benoit (changes for struts 1.2.2)

Constructor Summary
MBeanTreeBuilder()
           
 
Method Summary
 void buildTree(TreeControl treeControl, org.apache.struts.action.ActionServlet servlet, javax.servlet.http.HttpServletRequest request)
          Add the required nodes to the specified treeControl instance.
 void getJ2eeMBeans(TreeControlNode p_ParentNode, org.apache.struts.util.MessageResources p_Resources, java.util.ArrayList p_List)
          Append nodes for all defined J2EE MBeans.
protected  void getMBeanInfo(TreeControlNode nodeMBean, javax.management.ObjectName onMBean, org.apache.struts.util.MessageResources resources, java.lang.String serverName)
          Append nodes Attributes and Operations for a defined MBean.
 void getMBeans(TreeControlNode rootNode, org.apache.struts.util.MessageResources resources, javax.servlet.http.HttpServletRequest request)
          Append nodes for all defined MBeans.
 void getOwnerMBeans(TreeControlNode p_ParentNode, org.apache.struts.util.MessageResources p_Resources, java.util.ArrayList p_List)
          Append nodes for all defined Owner MBeans.
 void getUnknownMBeans(TreeControlNode p_ParentNode, org.apache.struts.util.MessageResources p_Resources, java.util.ArrayList p_List)
          Append nodes for all defined Unknown MBeans.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanTreeBuilder

public MBeanTreeBuilder()
Method Detail

buildTree

public void buildTree(TreeControl treeControl,
                      org.apache.struts.action.ActionServlet servlet,
                      javax.servlet.http.HttpServletRequest request)
Add the required nodes to the specified treeControl instance.

Specified by:
buildTree in interface TreeBuilder
Parameters:
treeControl - The TreeControl to which we should add our nodes
servlet - The controller servlet for the admin application
request - The servlet request we are processing

getMBeans

public void getMBeans(TreeControlNode rootNode,
                      org.apache.struts.util.MessageResources resources,
                      javax.servlet.http.HttpServletRequest request)
               throws java.lang.Exception
Append nodes for all defined MBeans.

Parameters:
rootNode - Root node for the tree control
resources - The MessageResources for our localized messages
Throws:
java.lang.Exception - if an exception occurs building the tree

getOwnerMBeans

public void getOwnerMBeans(TreeControlNode p_ParentNode,
                           org.apache.struts.util.MessageResources p_Resources,
                           java.util.ArrayList p_List)
                    throws java.lang.Exception
Append nodes for all defined Owner MBeans.

Parameters:
p_ParentNode - Parent node for the tree control
p_Resources - The MessageResources for our localized messages
p_List - The list of Mbeans
Throws:
java.lang.Exception - if an exception occurs building the tree

getJ2eeMBeans

public void getJ2eeMBeans(TreeControlNode p_ParentNode,
                          org.apache.struts.util.MessageResources p_Resources,
                          java.util.ArrayList p_List)
                   throws java.lang.Exception
Append nodes for all defined J2EE MBeans.

Parameters:
p_ParentNode - Parent node for the tree control
p_Resources - The MessageResources for our localized messages
p_List - The list of Mbeans
Throws:
java.lang.Exception - if an exception occurs building the tree

getUnknownMBeans

public void getUnknownMBeans(TreeControlNode p_ParentNode,
                             org.apache.struts.util.MessageResources p_Resources,
                             java.util.ArrayList p_List)
                      throws java.lang.Exception
Append nodes for all defined Unknown MBeans.

Parameters:
p_ParentNode - Parent node for the tree control
p_Resources - The MessageResources for our localized messages
p_List - The list of Mbeans
Throws:
java.lang.Exception - if an exception occurs building the tree

getMBeanInfo

protected void getMBeanInfo(TreeControlNode nodeMBean,
                            javax.management.ObjectName onMBean,
                            org.apache.struts.util.MessageResources resources,
                            java.lang.String serverName)
                     throws java.lang.Exception
Append nodes Attributes and Operations for a defined MBean.

Parameters:
nodeMBean - The MBean node
onMBean - The MBean Object name
resources - Resource
Throws:
java.lang.Exception