Examples of QueryExp


Examples of javax.management.QueryExp

        for (int i = 0; i < data.length; i++) {
            ObjectName on = new ObjectName("test:type=Simple,query=" +
                                           querySubString + ",name=" + i);
            Simple s = new Simple(data[i][0]);
            mbs.registerMBean(s, on);
            QueryExp q = null;
            switch (type) {
                case 1:
                    q = Query.initialSubString(Query.attr("String"),
                                               Query.value(substring));
                    break;
                case 2:
                    q = Query.anySubString(Query.attr("String"),
                                           Query.value(substring));
                    break;
                case 3:
                    q = Query.finalSubString(Query.attr("String"),
                                             Query.value(substring));
                    break;
            }
            q.setMBeanServer(mbs);
            boolean r = q.apply(on);
            System.out.print("Attribute Value = " +
                mbs.getAttribute(on, "String"));
            if (r && "OK".equals(data[i][type])) {
                System.out.println(" OK");
            } else if (!r && "KO".equals(data[i][type])) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.