01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package javax.management;
23:
24: import java.io.Serializable;
25:
26: /**
27: * A query expression.<p>
28: *
29: * An implementation of this interface can be used in
30: * a query. Multiple query expressions can be used together to form
31: * a more complex query.
32: *
33: * @author <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
34: * @version $Revision: 57200 $
35: */
36: public interface QueryExp extends Serializable {
37: // Constants ---------------------------------------------------
38:
39: // Public ------------------------------------------------------
40:
41: /**
42: * Apply this query expression to an MBean.
43: *
44: * @param name the object name of the mbean
45: * @return true or false as the result of the query expression.
46: * @exception BadStringOperationException when an invalid string operation
47: * is used during query construction
48: * @exception BadBinaryOpValueExpException when an invalid binary operation
49: * is used during query construction
50: * @exception BadAttributeValueExpException when an invalid MBean attribute
51: * is used during query construction
52: * @exception InvalidApplicationException when trying to apply a subquery
53: * expression to an MBean or an attribute expression to an
54: * MBean of the wrong class.
55: */
56: public boolean apply(ObjectName name)
57: throws BadStringOperationException,
58: BadBinaryOpValueExpException,
59: BadAttributeValueExpException, InvalidApplicationException;
60:
61: /**
62: * Set the MBeanServer for this query. Only MBeans registered in
63: * this server can be used in queries.
64: *
65: * @param server the MBeanServer
66: */
67: public void setMBeanServer(MBeanServer server);
68: }
|