Right Java tools for J2EE, Web Service, Grid and more. Open source and Enterprise.
|Home | Products | Documents | Downloads | Purchase | Support | Company | Partners | Contact |

com.acelet.s.dashboard
Class DynamicAttribute

java.lang.Object
  extended by 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.
 
Constructor Summary
DynamicAttribute()
           
 
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
 

Field Detail

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.

Constructor Detail

DynamicAttribute

public DynamicAttribute()
Method Detail

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

Copyright Acelet Corporation. 2000-2008. All rights reserved.