Methods Summary |
---|
public void | addAttribute(java.lang.String name, java.io.Serializable value)
if ( name == null || name.length() == 0 )
{
throw new IllegalArgumentException( );
}
mAttributes.put( name, value );
mMBeanInfo = null;
|
private synchronized javax.management.MBeanInfo | createMBeanInfo()
final MBeanInfo baseMBeanInfo = super.getMBeanInfo();
final MBeanAttributeInfo[] dynamicAttrInfos =
new MBeanAttributeInfo[ mAttributes.keySet().size() ];
final Iterator iter = mAttributes.keySet().iterator();
int i = 0;
while ( iter.hasNext() )
{
final String name = (String)iter.next();
final Object value = mAttributes.get( name );
final String type = value == null ? String.class.getName() : value.getClass().getName();
dynamicAttrInfos[ i ] = new MBeanAttributeInfo( name, type, "dynamically-added Attribute",
true, true, false );
++i;
}
final MBeanAttributeInfo[] attrInfos =
JMXUtil.mergeMBeanAttributeInfos( dynamicAttrInfos, baseMBeanInfo.getAttributes() );
return( JMXUtil.newMBeanInfo( baseMBeanInfo, attrInfos ) );
|
public byte[] | downloadBytes(int numBytes)
if ( numBytes <0 || numBytes > 10 * MEGABYTE )
{
throw new IllegalArgumentException( "Illegal count: " + numBytes );
}
final byte[] bytes = new byte[ numBytes ];
return( bytes );
|
public void | emitNotifications(java.io.Serializable data, int numNotifs, long interval)
if ( numNotifs <= 0 )
{
throw new IllegalArgumentException( "" + numNotifs );
}
new EmitterThread( data, numNotifs, interval ).start();
|
protected java.io.Serializable | getAttributeManually(java.lang.String name)
return( mAttributes.get( name ) );
|
public synchronized javax.management.MBeanInfo | getMBeanInfo()
if ( mMBeanInfo == null )
{
mMBeanInfo = createMBeanInfo();
}
return( mMBeanInfo );
|
public boolean | getMBeanInfoIsInvariant()
return( false );
|
public void | removeAttribute(java.lang.String name)
mAttributes.remove( name );
mMBeanInfo = null;
|
protected void | setAttributeManually(javax.management.Attribute attr)
mAttributes.put( attr.getName(), Serializable.class.cast( attr.getValue() ) );
|
public void | uploadBytes(byte[] bytes)
// do nothing; just a bandwidth test
|