|
Right Java tools for J2EE, Web Service, Grid and more. Open source and Enterprise.
|
com.acelet.s.dashboard
Class DynamicAttribute
java.lang.Object
com.acelet.s.dashboard.DynamicAttribute
public abstract class DynamicAttribute
- extends java.lang.Object
This is the class for providing dynamic attribute for setAttribute method for MBean.
Users must provide an implementation for method
getAttribute
to specify the attribute value.
Example:
public class RandomIntDynamicAttribute extends DynamicAttribute {
static Random random = new Random();
public Attribute getAttribute(String attributeName) throws InvalidArgumentException {
int value = random.nextInt(10);
if (value < 0)
value = -value;
Integer integer = new Integer(value);
return new Attribute(attributeName, integer);
}
}
|
Field Summary |
static Envoy |
envoy
envoy is a static variable of Envoy. |
|
Method Summary |
abstract javax.management.Attribute |
getAttribute(java.lang.String attributeName)
getAttribute is a user defined method. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
envoy
public static Envoy envoy
envoy is a static variable of Envoy.
It is initialized by the system and can be used to perform
related tasks.
DynamicAttribute
public DynamicAttribute()
getAttribute
public abstract javax.management.Attribute getAttribute(java.lang.String attributeName)
throws com.acelet.s.dashboard.InvalidArgumentException
getAttribute is a user defined method. It provide
dynamic attribute.
- Parameters:
attributeName - The name of the required attribute.
- Returns:
- the Attribute.
- Throws:
InvalidArgumentException.
com.acelet.s.dashboard.InvalidArgumentException