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 value expression.<p>
28: *
29: * Implementations of this interface represent arguments to expressions.
30: *
31: * @author <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
32: * @version $Revision: 57200 $
33: */
34: public interface ValueExp extends Serializable {
35: /**
36: * Apply this value expression to an MBean.
37: *
38: * @param name the object name of the mbean
39: * @return this value expression
40: * @exception BadStringOperationException when an invalid string operation
41: * is used during query construction
42: * @exception BadBinaryOpValueExpException when an invalid binary operation
43: * is used during query construction
44: * @exception BadAttributeValueExpException when an invalid MBean attribute
45: * is used during query construction
46: * @exception InvalidApplicationException when trying to apply a subquery
47: * expression to an MBean or an attribute expression to an
48: * MBean of the wrong class.
49: */
50: public ValueExp apply(ObjectName name)
51: throws BadStringOperationException,
52: BadBinaryOpValueExpException,
53: BadAttributeValueExpException, InvalidApplicationException;
54:
55: /**
56: * Set the MBeanServer for this expression. Only MBeans registered in
57: * this server can be used in queries.
58: *
59: * @param server the MBeanServer
60: */
61: public void setMBeanServer(MBeanServer server);
62: }
|