1. /*
  2. * @(#)QueryExp.java 4.17 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.management;
  8. // java import
  9. import java.io.Serializable;
  10. /**
  11. * <p>Represents relational constraints that can be used in database
  12. * query "where clauses". Instances of QueryExp are returned by the
  13. * static methods of the {@link Query} class.</p>
  14. *
  15. * <p>It is possible, but not
  16. * recommended, to create custom queries by implementing this
  17. * interface. In that case, it is better to extend the {@link
  18. * QueryEval} class than to implement the interface directly, so that
  19. * the {@link #setMBeanServer} method works correctly.
  20. *
  21. * @since 1.5
  22. */
  23. public interface QueryExp extends Serializable {
  24. /**
  25. * Applies the QueryExp on an MBean.
  26. *
  27. * @param name The name of the MBean on which the QueryExp will be applied.
  28. *
  29. * @return True if the query was successfully applied to the MBean, false otherwise
  30. *
  31. * @exception BadStringOperationException
  32. * @exception BadBinaryOpValueExpException
  33. * @exception BadAttributeValueExpException
  34. * @exception InvalidApplicationException
  35. */
  36. public boolean apply(ObjectName name) throws BadStringOperationException, BadBinaryOpValueExpException,
  37. BadAttributeValueExpException, InvalidApplicationException ;
  38. /**
  39. * Sets the MBean server on which the query is to be performed.
  40. *
  41. * @param s The MBean server on which the query is to be performed.
  42. */
  43. public void setMBeanServer(MBeanServer s) ;
  44. }