Home » openjdk-7 » javax » management » [javadoc | source]
public class: AttributeValueExp [javadoc | source]

All Implemented Interfaces:

Direct Known Subclasses:
    QualifiedAttributeValueExp, ClassAttributeValueExp

Represents attributes used as arguments to relational constraints. Instances of this class are usually obtained using Query.attr .

An AttributeValueExp may be used anywhere a ValueExp is required.

 public AttributeValueExp() 
     public AttributeValueExp(String attr) 
      Creates a new AttributeValueExp representing the specified object attribute, named attr.
      attr - the name of the attribute whose value is the value of this ValueExp .
    Method from javax.management.AttributeValueExp Summary:
    apply,   getAttribute,   getAttributeName,   setMBeanServer,   toString
    Methods from java.lang.Object:
    clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
    Method from javax.management.AttributeValueExp Detail:
     public ValueExp apply(ObjectName name) throws BadStringOperationException, BadBinaryOpValueExpException, BadAttributeValueExpException, InvalidApplicationException 

      Applies the AttributeValueExp on an MBean. This method calls getAttribute(name) and wraps the result as a {@code ValueExp}. The value returned by {@code getAttribute} must be a {@code Number}, {@code String}, or {@code Boolean}; otherwise this method throws a {@code BadAttributeValueExpException}, which will cause the containing query to be false for this {@code name}.

     protected Object getAttribute(ObjectName name) 

      Return the value of the given attribute in the named MBean. If the attempt to access the attribute generates an exception, return null.

      The MBean Server used is the one returned by QueryEval#getMBeanServer() .

     public String getAttributeName() 
      Returns a string representation of the name of the attribute.
     public  void setMBeanServer(MBeanServer s) 
    Deprecated! This - method has no effect. The MBean Server used to obtain an attribute value is QueryEval#getMBeanServer() .

      Sets the MBean server on which the query is to be performed.
     public String toString() 
      Returns the string representing its value.