javax.management
Class AttributeValueExp
java.lang.Object
|
+--javax.management.AttributeValueExp
- public class AttributeValueExp
- extends java.lang.Object
- implements ValueExp
The AttributeValueExp class represents attributes used as arguments to
relational constraints. An AttributeValueExp may be used anywhere a
ValueExp is required.
- See Also:
- Serialized Form
|
Method Summary |
ValueExp |
apply(ObjectName object)
Applies the AttributeValueExp on MBean. |
protected java.lang.Object |
getAttribute(ObjectName name)
Return the value of the given attribute in the named MBean. |
java.lang.String |
getAttributeName()
Returns a string representation of the name of the attribute. |
(package private) java.lang.Object |
getObject()
|
void |
setMBeanServer(MBeanServer server)
Sets the MBeanServer on which the query is to be accessed. |
java.lang.String |
toString()
Returns the string representing its value |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
classattr
boolean classattr
mbeanName
ObjectName mbeanName
AttributeValueExp
public AttributeValueExp()
- Default Constructor.
AttributeValueExp
public AttributeValueExp(java.lang.String attr)
- Creates a new AttributeValueExp representing the specified
object attribute, named attr.
- Parameters:
attr - creates AttributeValueExp with the specified attribute
AttributeValueExp
AttributeValueExp(java.lang.String attr,
java.lang.Object nobject)
AttributeValueExp
AttributeValueExp(java.lang.String className,
java.lang.String attr)
AttributeValueExp
AttributeValueExp(AttributeValueExp v1,
AttributeValueExp v2,
int qtype)
apply
public ValueExp apply(ObjectName object)
throws BadAttributeValueExpException,
InvalidApplicationException,
BadStringOperationException,
BadBinaryOpValueExpException
- Applies the AttributeValueExp on MBean.
- Specified by:
- apply in interface ValueExp
- Parameters:
object - The MBean objectname on which the AttributeValueExp will be applied.- Returns:
- The ValueExp.
- Throws:
- BadAttributeValueExpException - This ExpException is thrown when an invalid MBean
attribute is passed to a query constructing method.
- InvalidApplicationException - This exception is thrown when an attempt is made to
apply either of the following:
A subquery expression to an MBean
A qualified attribute expression to an MBean of the wrong class
- BadStringOperationException - This exception is thrown when an invalid string
operation is passed to a method for constructing a query.
- BadBinaryOpValueExpException - This exception is thrown when an invalid expression
is passed to a method for constructing a query.
getAttributeName
public java.lang.String getAttributeName()
- Returns a string representation of the name of the attribute.
- Returns:
- A string representation of the name of the attribute.
setMBeanServer
public void setMBeanServer(MBeanServer server)
- Sets the MBeanServer on which the query is to be accessed.
- Specified by:
- setMBeanServer in interface ValueExp
- Parameters:
s - - The MBeanServer on which the query is to be accessed.
toString
public java.lang.String toString()
- Returns the string representing its value
- Overrides:
- toString in class java.lang.Object
getAttribute
protected java.lang.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.
- Parameters:
name - the name of the MBean whose attribute is to be returned.- Returns:
- the value of the attribute, or null if it could not be obtained.
getObject
java.lang.Object getObject()