cz.cuni.amis.introspection.jmx
Class DynamicMBeanToFolderAdapter

Package class diagram package DynamicMBeanToFolderAdapter
java.lang.Object
  extended by cz.cuni.amis.introspection.Feature
      extended by cz.cuni.amis.introspection.Folder
          extended by cz.cuni.amis.introspection.AbstractObjectFolder<DynamicProxy>
              extended by cz.cuni.amis.introspection.jmx.DynamicMBeanToFolderAdapter

public class DynamicMBeanToFolderAdapter
extends AbstractObjectFolder<DynamicProxy>

Adapts arbitrary MBean (packed in DynamicProxy object) to Folder object. Subfolders of this folder are all MBeans registered onthe same server under the same domain whose type is {type of adapted MBean} + "." + {name of adapted MBean}. For example if JMX ObjectName of MBean being adapted is "myDomain:type=a,name=b" then MBeans with ObjectNames "myDomain:type=a.b,name=c1" and "myDomain:type=a.b,name=c2" would be both recognized as subfolders of this folder.

Author:
Ik

Field Summary
 
Fields inherited from class cz.cuni.amis.introspection.Feature
name
 
Constructor Summary
DynamicMBeanToFolderAdapter(DynamicProxy folderMBean)
          Creates new Folder whose name would be folderMBean.getObjectName().getKeyProperty("name").
DynamicMBeanToFolderAdapter(DynamicProxy folderMBean, String name)
          Creates new Folder with custom name.
 
Method Summary
protected  Folder[] computeFolders(DynamicProxy object)
          Computes list of introspectable children of object to be introspected.
protected  Property[] computeProperties(DynamicProxy object)
          Computes list of properties of object to be introspected.
 
Methods inherited from class cz.cuni.amis.introspection.AbstractObjectFolder
getFolders, getProperties, getProxiedObject
 
Methods inherited from class cz.cuni.amis.introspection.Folder
createProperties, createProperties, getFolder, getProperty, loadFromProperties, loadFromProperties
 
Methods inherited from class cz.cuni.amis.introspection.Feature
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicMBeanToFolderAdapter

public DynamicMBeanToFolderAdapter(DynamicProxy folderMBean)
Creates new Folder whose name would be folderMBean.getObjectName().getKeyProperty("name").

Parameters:
folderMBean - bean being adapted

DynamicMBeanToFolderAdapter

public DynamicMBeanToFolderAdapter(DynamicProxy folderMBean,
                                   String name)
Creates new Folder with custom name.

Parameters:
folderMBean -
name -
Method Detail

computeProperties

protected Property[] computeProperties(DynamicProxy object)
Description copied from class: AbstractObjectFolder
Computes list of properties of object to be introspected.

Specified by:
computeProperties in class AbstractObjectFolder<DynamicProxy>
Parameters:
object - Object to be introspected.
Returns:
Array of properties.

computeFolders

protected Folder[] computeFolders(DynamicProxy object)
                           throws IntrospectionException
Description copied from class: AbstractObjectFolder
Computes list of introspectable children of object to be introspected.

Specified by:
computeFolders in class AbstractObjectFolder<DynamicProxy>
Parameters:
object - Object to be introspected.
Returns:
Array of introspectable children.
Throws:
IntrospectionException


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.