br.gov.frameworkdemoiselle.internal.proxy
Class DynamicMBeanProxy

java.lang.Object
  extended by br.gov.frameworkdemoiselle.internal.proxy.DynamicMBeanProxy
All Implemented Interfaces:
DynamicMBean

public class DynamicMBeanProxy
extends Object
implements DynamicMBean

This class is a MBean that gets registered everytime you mark a class with ManagementController. It dynamicaly reads the fields and operations contained in a ManagementController class and exposes them to the MBean server. Everytime a client tries to call an operation or read/write a property inside a ManagementController class, this class will call the appropriate method and pass the result to the MBean client.

Author:
SERPRO

Constructor Summary
DynamicMBeanProxy(ManagedType type)
           
 
Method Summary
 Object getAttribute(String attribute)
           
 AttributeList getAttributes(String[] attributes)
           
 ResourceBundle getBundle()
           
 MBeanInfo getMBeanInfo()
           
 Object invoke(String actionName, Object[] params, String[] signature)
           
 void setAttribute(Attribute attribute)
           
 AttributeList setAttributes(AttributeList attributes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicMBeanProxy

public DynamicMBeanProxy(ManagedType type)
Method Detail

getAttribute

public Object getAttribute(String attribute)
                    throws AttributeNotFoundException,
                           MBeanException,
                           ReflectionException
Specified by:
getAttribute in interface DynamicMBean
Throws:
AttributeNotFoundException
MBeanException
ReflectionException

setAttribute

public void setAttribute(Attribute attribute)
                  throws AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Specified by:
setAttribute in interface DynamicMBean
Throws:
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException

getAttributes

public AttributeList getAttributes(String[] attributes)
Specified by:
getAttributes in interface DynamicMBean

setAttributes

public AttributeList setAttributes(AttributeList attributes)
Specified by:
setAttributes in interface DynamicMBean

invoke

public Object invoke(String actionName,
                     Object[] params,
                     String[] signature)
              throws MBeanException,
                     ReflectionException
Specified by:
invoke in interface DynamicMBean
Throws:
MBeanException
ReflectionException

getMBeanInfo

public MBeanInfo getMBeanInfo()
Specified by:
getMBeanInfo in interface DynamicMBean

getBundle

public ResourceBundle getBundle()


Copyright © 2013 SERPRO - Serviço Federal de Processamento de Dados. All Rights Reserved.