01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.com
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package org.huihoo.jfox.jmx.queries;
09:
10: import javax.management.QueryEval;
11: import javax.management.ValueExp;
12: import javax.management.ObjectName;
13: import javax.management.BadStringOperationException;
14: import javax.management.BadBinaryOpValueExpException;
15: import javax.management.BadAttributeValueExpException;
16: import javax.management.InvalidApplicationException;
17:
18: /**
19: *
20: * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
21: */
22:
23: public class BooleanValueExp extends QueryEval implements ValueExp {
24:
25: private boolean val;
26:
27: public BooleanValueExp(boolean flag) {
28: val = flag;
29: }
30:
31: public Boolean getValue() {
32: return new Boolean(val);
33: }
34:
35: public String toString() {
36: return String.valueOf(val);
37: }
38:
39: public ValueExp apply(ObjectName objectname)
40: throws BadStringOperationException,
41: BadBinaryOpValueExpException,
42: BadAttributeValueExpException, InvalidApplicationException {
43: return this;
44: }
45: }
|