javax.management
Interface QueryExp

All Superinterfaces:
Serializable
All Known Implementing Classes:
ObjectName

public interface QueryExp
extends Serializable

Applies the type of relational constraints seen in the where clauses of databases to an ObjectName. Instances of this class are usually returned by the static methods of the Query classes. If a custom implementation is required, it is better to extend the QueryEval class, rather than simply implementing this interface, in order to ensure that the setMBeanServer(MBeanServer) method functions correctly.

Since:
1.5

Method Summary
 boolean apply(ObjectName name)
          Applies the query to the specified management bean.
 void setMBeanServer(MBeanServer server)
          Changes the MBeanServer on which this query is performed.
 

Method Detail

apply

boolean apply(ObjectName name)
              throws BadStringOperationException,
                     BadBinaryOpValueExpException,
                     BadAttributeValueExpException,
                     InvalidApplicationException
Applies the query to the specified management bean.

Parameters:
name - the name of the management bean.
Returns:
true if the query was applied successfully.
Throws:
BadStringOperationException - if an invalid string operation is used by the query.
BadBinaryOpValueExpException - if an invalid expression is used by the query.
BadAttributeValueExpException - if an invalid attribute is used by the query.
InvalidApplicationException - if the query is applied to the wrong type of bean.

setMBeanServer

void setMBeanServer(MBeanServer server)
Changes the MBeanServer on which this query is performed.

Parameters:
server - the new server to use.