com.sun.appserv.management.base
Interface Sample

All Superinterfaces:
AMX, AMXMBeanLogging, NotificationBroadcaster, NotificationEmitter, Singleton, Utility

public interface Sample
extends Utility, AMX, Singleton

Interface for a sample MBean , used as target for sample and test code. Various Attributes of varying types are made available for testing.


Field Summary
static String J2EE_TYPE
          The j2eeType as returned by AMX.getJ2EEType().
static String SAMPLE_NOTIFICATION_TYPE
          The type of Notification emitted by emitNotification().
static String USER_DATA_KEY
          The key to access user data within the Map obtained from Notification.getUserData().
 
Fields inherited from interface com.sun.appserv.management.base.AMX
FULL_TYPE_DELIM, GROUP_CONFIGURATION, GROUP_JSR77, GROUP_MONITORING, GROUP_OTHER, GROUP_UTILITY, J2EE_TYPE_KEY, JMX_DOMAIN, NAME_KEY, NO_NAME, NOTIFICATION_PREFIX, NULL_NAME
 
Method Summary
 void addAttribute(String name, Object value)
          Add a new Attribute.
 byte[] downloadBytes(int numBytes)
           
 void emitNotifications(Object data, int numNotifs, long intervalMillis)
          Emit 'numNotifs' notifications of type SAMPLE_NOTIFICATION_TYPE at the specified interval.
 void removeAttribute(String name)
          Remove an Attribute.
 void uploadBytes(byte[] bytes)
          For testing bandwidth...
 
Methods inherited from interface com.sun.appserv.management.base.AMX
getContainer, getDomainRoot, getFullType, getGroup, getJ2EEType, getName, isDAS
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 
Methods inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
getMBeanLoggerName, getMBeanLogLevel, setMBeanLogLevel
 

Field Detail

J2EE_TYPE

static final String J2EE_TYPE
The j2eeType as returned by AMX.getJ2EEType().

See Also:
Constant Field Values

SAMPLE_NOTIFICATION_TYPE

static final String SAMPLE_NOTIFICATION_TYPE
The type of Notification emitted by emitNotification().

See Also:
Constant Field Values

USER_DATA_KEY

static final String USER_DATA_KEY
The key to access user data within the Map obtained from Notification.getUserData().

See Also:
Constant Field Values
Method Detail

emitNotifications

void emitNotifications(Object data,
                       int numNotifs,
                       long intervalMillis)
Emit 'numNotifs' notifications of type SAMPLE_NOTIFICATION_TYPE at the specified interval.

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

addAttribute

void addAttribute(String name,
                  Object value)
Add a new Attribute. After this, the MBeanInfo will contain an MBeanAttributeInfo for this Attribute.

Parameters:
name -
value -

removeAttribute

void removeAttribute(String name)
Remove an Attribute. After this, the MBeanInfo will no longer contain an MBeanAttributeInfo for this Attribute.


uploadBytes

void uploadBytes(byte[] bytes)
For testing bandwidth...


downloadBytes

byte[] downloadBytes(int numBytes)