Package org.glassfish.admin.amx.base
Interface Sample
-
@Taxonomy(stability=NOT_AN_INTERFACE) @AMXMBeanMetadata(singleton=true, globalSingleton=true, leaf=true, immutableMBeanInfo=false) public interface Sample extends AMXProxy
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
Fields Modifier and Type Field Description 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().
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.ObjectName[]
getAllAMX()
explicity getter using an array, must work through proxy codeObject[]
getAllSortsOfStuff()
Attribute whose values will have a variety of types that should pass the AMXValidtorvoid
removeAttribute(String name)
Remove an Attribute.void
uploadBytes(byte[] bytes)
For testing bandwidth...-
Methods inherited from interface org.glassfish.admin.amx.core.AMX_SPI
getChildren, getName, getParent
-
Methods inherited from interface org.glassfish.admin.amx.core.AMXProxy
as, attributeNames, attributesMap, attributesMap, child, child, childrenMap, childrenMap, childrenMaps, childrenSet, extra, invokeOp, invokeOp, java, nameProp, objectName, parent, parentPath, path, type, valid
-
-
-
-
Field Detail
-
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
@ManagedOperation(impact=1) 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 >= 1intervalMillis
- interval at which Notifications should be issued >= 0
-
addAttribute
@ManagedOperation(impact=1) 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
@ManagedOperation(impact=1) void removeAttribute(String name)
Remove an Attribute. After this, the MBeanInfo will no longer contain an MBeanAttributeInfo for this Attribute.
-
uploadBytes
@ManagedOperation(impact=1) void uploadBytes(byte[] bytes)
For testing bandwidth...
-
downloadBytes
@ManagedOperation(impact=0) byte[] downloadBytes(int numBytes)
-
getAllAMX
@ManagedAttribute ObjectName[] getAllAMX()
explicity getter using an array, must work through proxy code
-
getAllSortsOfStuff
@ManagedAttribute Object[] getAllSortsOfStuff()
Attribute whose values will have a variety of types that should pass the AMXValidtor
-
-