Java Reference
In-Depth Information
import java.lang.reflect.*;
import java.util.*;
public class ModelMBeanInfoBuilder
{
protected Hashtable attributes = new Hashtable();
protected Hashtable notifications = new Hashtable();
protected Hashtable constructors = new Hashtable();
protected Hashtable operations = new Hashtable();;
public ModelMBeanInfoBuilder()
{
}
public void addModelMBeanMethod( String name,
String[] paramTypes,
String[] paramNames,
String[] paramDescs,
String description, String rtype,
int type, Descriptor desc )
{
MBeanParameterInfo[] params = null;
if( paramTypes != null )
{
params = new MBeanParameterInfo[ paramTypes.length ];
for( int i = 0; i < paramTypes.length; i++ )
{
params[i] = new MBeanParameterInfo( paramNames[i],
paramTypes[i], paramDescs[i] );
}
}
Expose an
operation
operations.put( name,
new ModelMBeanOperationInfo( name, description,
params, rtype, type, desc ) );
}
public void addModelMBeanNotification( String[] type,
String className,
String description, Descriptor desc )
{
notifications.put( className,
new ModelMBeanNotificationInfo( type,
className, description, desc ) );
}
Expose an
attribute
public void addModelMBeanAttribute( String fname,String ftype,
boolean read, boolean write,
boolean is,
String description, Descriptor desc )
{
attributes.put( fname, new ModelMBeanAttributeInfo(fname,
ftype,
Search WWH ::




Custom Search