FileDocCategorySizeDatePackage
MBeanTag.javaAPI DocJBoss 4.2.13173Fri Jul 13 21:02:12 BST 2007org.jboss.console.plugins.helpers.servlet

MBeanTag

public class MBeanTag extends javax.servlet.jsp.tagext.TagSupport
see
author
Sacha Labourey.
version
$Revision: 57191 $

Revisions:

4 janv. 2003 Sacha Labourey:

  • First implementation

Fields Summary
protected String
interfaceName
protected String
variableName
protected String
mbeanName
Constructors Summary
Methods Summary
public intdoEndTag()

      return EVAL_PAGE;
   
public intdoStartTag()

      try
      {
         // Who do we proxy?
         //
         ObjectName objName = null;
         if (mbeanName == null)
         {
            objName = new ObjectName (pageContext.getRequest().getParameter("ObjectName"));
         }
         else
         {
            objName = new ObjectName (mbeanName);
         }
         
         // Which type do we proxy?
         //
         Class type = Thread.currentThread().getContextClassLoader().loadClass(this.interfaceName);
         
         // we build the proxy
         //
         Object result = MBeanProxy.get(type, objName, Server.getMBeanServer());
         
         // we assign the proxy to the variable
         //
         pageContext.setAttribute(variableName, result);
         
         return EVAL_BODY_INCLUDE;
      }
      catch (Exception e)
      {
         throw new JspTagException (e.toString());
      }
   
public java.lang.StringgetId()

 return this.variableName; 
public java.lang.StringgetIntf()

   
        return this.interfaceName; 
public java.lang.StringgetMbean()

 return this.mbeanName; 
public voidsetId(java.lang.String var)

 this.variableName = var; 
public voidsetIntf(java.lang.String intf)

 this.interfaceName = intf; 
public voidsetMbean(java.lang.String mbean)

 this.mbeanName = mbean;