FileDocCategorySizeDatePackage
Sample.javaAPI DocGlassfish v2 API3933Fri May 04 22:30:30 BST 2007com.sun.appserv.management.base

Sample

public interface Sample implements Utility, Singleton, com.sun.appserv.management.base.AMX
Interface for a sample MBean , used as target for sample and test code. Various Attributes of varying types are made available for testing.

Fields Summary
public static final String
J2EE_TYPE
The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}.
public static final String
SAMPLE_NOTIFICATION_TYPE
The type of Notification emitted by emitNotification().
public static final String
USER_DATA_KEY
The key to access user data within the Map obtained from Notification.getUserData().
Constructors Summary
Methods Summary
public voidaddAttribute(java.lang.String name, java.lang.Object value)
Add a new Attribute. After this, the MBeanInfo will contain an MBeanAttributeInfo for this Attribute.

param
name
param
value

public byte[]downloadBytes(int numBytes)

public voidemitNotifications(java.lang.Object data, int numNotifs, long intervalMillis)
Emit 'numNotifs' notifications of type SAMPLE_NOTIFICATION_TYPE at the specified interval.

param
data arbitrary data which will be placed into the Notification's UserData field.
param
numNotifs number of Notifications to issue >= 1
param
intervalMillis interval at which Notifications should be issued >= 0

public voidremoveAttribute(java.lang.String name)
Remove an Attribute. After this, the MBeanInfo will no longer contain an MBeanAttributeInfo for this Attribute.

public voiduploadBytes(byte[] bytes)
For testing bandwidth...