javax.management
Class AttributeValueExp

java.lang.Object
  extended byjavax.management.AttributeValueExp
All Implemented Interfaces:
java.io.Serializable, ValueExp (src)

public class AttributeValueExp
extends java.lang.Object
implements ValueExp (src)

A String that is an arguement to a query.

Revisions:

20020317 Adrian Brock:

20020711 Adrian Brock:

See Also:
Serialized Form

Constructor Summary
AttributeValueExp()
          Construct an attribute value expression for the null attribute name
AttributeValueExp(java.lang.String attr)
          Construct an attribute value expression for the passed attribute name
 
Method Summary
 ValueExp (src) apply(ObjectName (src)  name)
          Apply this value expression to an MBean.
protected  java.lang.Object getAttribute(ObjectName (src)  name)
          Get the value of the attribute for a given object name
 java.lang.String getAttributeName()
          Get the attribute name.
 void setMBeanServer(MBeanServer (src)  server)
          Set the MBeanServer for this expression.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeValueExp

public AttributeValueExp()
Construct an attribute value expression for the null attribute name


AttributeValueExp

public AttributeValueExp(java.lang.String attr)
Construct an attribute value expression for the passed attribute name

Parameters:
attr - the attribute name
Method Detail

getAttributeName

public java.lang.String getAttributeName()
Get the attribute name.

Returns:
the attribute name

apply

public ValueExp (src)  apply(ObjectName (src)  name)
               throws BadStringOperationException (src) ,
                      BadBinaryOpValueExpException (src) ,
                      BadAttributeValueExpException (src) ,
                      InvalidApplicationException (src) 
Description copied from interface: ValueExp (src)
Apply this value expression to an MBean.

Specified by:
apply in interface ValueExp (src)
Parameters:
name - the object name of the mbean
Returns:
this value expression
Throws:
BadAttributeValueExpException (src) - when an invalid MBean attribute is used during query construction
InvalidApplicationException (src) - when trying to apply a subquery expression to an MBean or an attribute expression to an MBean of the wrong class.
BadBinaryOpValueExpException (src) - when an invalid binary operation is used during query construction
BadStringOperationException (src) - when an invalid string operation is used during query construction

setMBeanServer

public void setMBeanServer(MBeanServer (src)  server)
Description copied from interface: ValueExp (src)
Set the MBeanServer for this expression. Only MBeans registered in this server can be used in queries.

Specified by:
setMBeanServer in interface ValueExp (src)
Parameters:
server - the MBeanServer

toString

public java.lang.String toString()

getAttribute

protected java.lang.Object getAttribute(ObjectName (src)  name)
Get the value of the attribute for a given object name

Parameters:
name - - the object name
Returns:
the value of the attribute