< prev index next >

src/java.management/share/classes/javax/management/Query.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 126,136 **** * @param q1 A query expression. * @param q2 Another query expression. * * @return The conjunction of the two arguments. The returned object * will be serialized as an instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.AndQueryExp"> * javax.management.AndQueryExp</a>. */ public static QueryExp and(QueryExp q1, QueryExp q2) { return new AndQueryExp(q1, q2); } --- 126,136 ---- * @param q1 A query expression. * @param q2 Another query expression. * * @return The conjunction of the two arguments. The returned object * will be serialized as an instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.AndQueryExp"> * javax.management.AndQueryExp</a>. */ public static QueryExp and(QueryExp q1, QueryExp q2) { return new AndQueryExp(q1, q2); }
*** 142,152 **** * @param q1 A query expression. * @param q2 Another query expression. * * @return The disjunction of the two arguments. The returned object * will be serialized as an instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.OrQueryExp"> * javax.management.OrQueryExp</a>. */ public static QueryExp or(QueryExp q1, QueryExp q2) { return new OrQueryExp(q1, q2); } --- 142,152 ---- * @param q1 A query expression. * @param q2 Another query expression. * * @return The disjunction of the two arguments. The returned object * will be serialized as an instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.OrQueryExp"> * javax.management.OrQueryExp</a>. */ public static QueryExp or(QueryExp q1, QueryExp q2) { return new OrQueryExp(q1, q2); }
*** 159,169 **** * @param v2 Another value expression. * * @return A "greater than" constraint on the arguments. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #GT}. */ public static QueryExp gt(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(GT, v1, v2); --- 159,169 ---- * @param v2 Another value expression. * * @return A "greater than" constraint on the arguments. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #GT}. */ public static QueryExp gt(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(GT, v1, v2);
*** 177,187 **** * @param v2 Another value expression. * * @return A "greater than or equal to" constraint on the * arguments. The returned object will be serialized as an * instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #GE}. */ public static QueryExp geq(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(GE, v1, v2); --- 177,187 ---- * @param v2 Another value expression. * * @return A "greater than or equal to" constraint on the * arguments. The returned object will be serialized as an * instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #GE}. */ public static QueryExp geq(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(GE, v1, v2);
*** 195,205 **** * @param v2 Another value expression. * * @return A "less than or equal to" constraint on the arguments. * The returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #LE}. */ public static QueryExp leq(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(LE, v1, v2); --- 195,205 ---- * @param v2 Another value expression. * * @return A "less than or equal to" constraint on the arguments. * The returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #LE}. */ public static QueryExp leq(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(LE, v1, v2);
*** 213,223 **** * @param v2 Another value expression. * * @return A "less than" constraint on the arguments. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #LT}. */ public static QueryExp lt(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(LT, v1, v2); --- 213,223 ---- * @param v2 Another value expression. * * @return A "less than" constraint on the arguments. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #LT}. */ public static QueryExp lt(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(LT, v1, v2);
*** 231,241 **** * @param v2 Another value expression. * * @return A "equal to" constraint on the arguments. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #EQ}. */ public static QueryExp eq(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(EQ, v1, v2); --- 231,241 ---- * @param v2 Another value expression. * * @return A "equal to" constraint on the arguments. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp"> * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal * to {@link #EQ}. */ public static QueryExp eq(ValueExp v1, ValueExp v2) { return new BinaryRelQueryExp(EQ, v1, v2);
*** 250,260 **** * @param v3 Value expression that represents a boundary of the constraint. * * @return The constraint that v1 lies between v2 and v3. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.BetweenQueryExp"> * javax.management.BetweenQueryExp</a>. */ public static QueryExp between(ValueExp v1, ValueExp v2, ValueExp v3) { return new BetweenQueryExp(v1, v2, v3); } --- 250,260 ---- * @param v3 Value expression that represents a boundary of the constraint. * * @return The constraint that v1 lies between v2 and v3. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BetweenQueryExp"> * javax.management.BetweenQueryExp</a>. */ public static QueryExp between(ValueExp v1, ValueExp v2, ValueExp v3) { return new BetweenQueryExp(v1, v2, v3); }
*** 278,288 **** * @param s A string value expression representing a matching constraint * * @return A query expression that represents the matching * constraint on the string argument. The returned object will * be serialized as an instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.MatchQueryExp"> * javax.management.MatchQueryExp</a>. */ public static QueryExp match(AttributeValueExp a, StringValueExp s) { return new MatchQueryExp(a, s); } --- 278,288 ---- * @param s A string value expression representing a matching constraint * * @return A query expression that represents the matching * constraint on the string argument. The returned object will * be serialized as an instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.MatchQueryExp"> * javax.management.MatchQueryExp</a>. */ public static QueryExp match(AttributeValueExp a, StringValueExp s) { return new MatchQueryExp(a, s); }
*** 318,328 **** * @param name The name of the attribute. * * @return An attribute expression for the attribute named name. * The returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.QualifiedAttributeValueExp"> * javax.management.QualifiedAttributeValueExp</a>. */ public static AttributeValueExp attr(String className, String name) { return new QualifiedAttributeValueExp(className, name); } --- 318,328 ---- * @param name The name of the attribute. * * @return An attribute expression for the attribute named name. * The returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.QualifiedAttributeValueExp"> * javax.management.QualifiedAttributeValueExp</a>. */ public static AttributeValueExp attr(String className, String name) { return new QualifiedAttributeValueExp(className, name); }
*** 336,346 **** * MBeanServer#getObjectInstance * MBeanServer.getObjectInstance(objectName)}.</p> * * @return A class attribute expression. The returned object * will be serialized as an instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.ClassAttributeValueExp"> * javax.management.ClassAttributeValueExp</a>. */ public static AttributeValueExp classattr() { return new ClassAttributeValueExp(); } --- 336,346 ---- * MBeanServer#getObjectInstance * MBeanServer.getObjectInstance(objectName)}.</p> * * @return A class attribute expression. The returned object * will be serialized as an instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.ClassAttributeValueExp"> * javax.management.ClassAttributeValueExp</a>. */ public static AttributeValueExp classattr() { return new ClassAttributeValueExp(); }
*** 350,360 **** * * @param queryExp The constraint to negate. * * @return A negated constraint. The returned object will be * serialized as an instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.NotQueryExp"> * javax.management.NotQueryExp</a>. */ public static QueryExp not(QueryExp queryExp) { return new NotQueryExp(queryExp); } --- 350,360 ---- * * @param queryExp The constraint to negate. * * @return A negated constraint. The returned object will be * serialized as an instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.NotQueryExp"> * javax.management.NotQueryExp</a>. */ public static QueryExp not(QueryExp queryExp) { return new NotQueryExp(queryExp); }
*** 366,376 **** * @param valueList An array of ValueExps. * * @return A QueryExp that represents the constraint. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.InQueryExp"> * javax.management.InQueryExp</a>. */ public static QueryExp in(ValueExp val, ValueExp valueList[]) { return new InQueryExp(val, valueList); } --- 366,376 ---- * @param valueList An array of ValueExps. * * @return A QueryExp that represents the constraint. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.InQueryExp"> * javax.management.InQueryExp</a>. */ public static QueryExp in(ValueExp val, ValueExp valueList[]) { return new InQueryExp(val, valueList); }
*** 393,403 **** * @param val An instance of Number. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(Number val) { return new NumericValueExp(val); } --- 393,403 ---- * @param val An instance of Number. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(Number val) { return new NumericValueExp(val); }
*** 409,419 **** * @param val An int value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(int val) { return new NumericValueExp((long) val); } --- 409,419 ---- * @param val An int value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(int val) { return new NumericValueExp((long) val); }
*** 425,435 **** * @param val A long value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(long val) { return new NumericValueExp(val); } --- 425,435 ---- * @param val A long value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(long val) { return new NumericValueExp(val); }
*** 441,451 **** * @param val A float value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(float val) { return new NumericValueExp((double) val); } --- 441,451 ---- * @param val A float value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(float val) { return new NumericValueExp((double) val); }
*** 457,467 **** * @param val A double value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(double val) { return new NumericValueExp(val); } --- 457,467 ---- * @param val A double value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp"> * javax.management.NumericValueExp</a>. */ public static ValueExp value(double val) { return new NumericValueExp(val); }
*** 473,483 **** * @param val A boolean value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.BooleanValueExp"> * javax.management.BooleanValueExp</a>. */ public static ValueExp value(boolean val) { return new BooleanValueExp(val); } --- 473,483 ---- * @param val A boolean value. * * @return A ValueExp object containing the argument. The * returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BooleanValueExp"> * javax.management.BooleanValueExp</a>. */ public static ValueExp value(boolean val) { return new BooleanValueExp(val); }
*** 490,500 **** * @param value2 The second '+' operand. * * @return A ValueExp representing the sum or concatenation of * the two arguments. The returned object will be serialized as * an instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp"> * javax.management.BinaryOpValueExp</a> with an {@code op} equal to * {@link #PLUS}. */ public static ValueExp plus(ValueExp value1, ValueExp value2) { return new BinaryOpValueExp(PLUS, value1, value2); --- 490,500 ---- * @param value2 The second '+' operand. * * @return A ValueExp representing the sum or concatenation of * the two arguments. The returned object will be serialized as * an instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryOpValueExp"> * javax.management.BinaryOpValueExp</a> with an {@code op} equal to * {@link #PLUS}. */ public static ValueExp plus(ValueExp value1, ValueExp value2) { return new BinaryOpValueExp(PLUS, value1, value2);
*** 508,518 **** * @param value2 The second '*' operand. * * @return A ValueExp representing the product. The returned * object will be serialized as an instance of the non-public * class ! * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp"> * javax.management.BinaryOpValueExp</a> with an {@code op} equal to * {@link #TIMES}. */ public static ValueExp times(ValueExp value1,ValueExp value2) { return new BinaryOpValueExp(TIMES, value1, value2); --- 508,518 ---- * @param value2 The second '*' operand. * * @return A ValueExp representing the product. The returned * object will be serialized as an instance of the non-public * class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryOpValueExp"> * javax.management.BinaryOpValueExp</a> with an {@code op} equal to * {@link #TIMES}. */ public static ValueExp times(ValueExp value1,ValueExp value2) { return new BinaryOpValueExp(TIMES, value1, value2);
*** 526,536 **** * @param value2 The second '-' operand. * * @return A ValueExp representing the difference between two * arguments. The returned object will be serialized as an * instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp"> * javax.management.BinaryOpValueExp</a> with an {@code op} equal to * {@link #MINUS}. */ public static ValueExp minus(ValueExp value1, ValueExp value2) { return new BinaryOpValueExp(MINUS, value1, value2); --- 526,536 ---- * @param value2 The second '-' operand. * * @return A ValueExp representing the difference between two * arguments. The returned object will be serialized as an * instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryOpValueExp"> * javax.management.BinaryOpValueExp</a> with an {@code op} equal to * {@link #MINUS}. */ public static ValueExp minus(ValueExp value1, ValueExp value2) { return new BinaryOpValueExp(MINUS, value1, value2);
*** 544,554 **** * @param value2 The second '/' operand. * * @return A ValueExp representing the quotient of two arguments. * The returned object will be serialized as an instance of the * non-public class ! * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp"> * javax.management.BinaryOpValueExp</a> with an {@code op} equal to * {@link #DIV}. */ public static ValueExp div(ValueExp value1, ValueExp value2) { return new BinaryOpValueExp(DIV, value1, value2); --- 544,554 ---- * @param value2 The second '/' operand. * * @return A ValueExp representing the quotient of two arguments. * The returned object will be serialized as an instance of the * non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryOpValueExp"> * javax.management.BinaryOpValueExp</a> with an {@code op} equal to * {@link #DIV}. */ public static ValueExp div(ValueExp value1, ValueExp value2) { return new BinaryOpValueExp(DIV, value1, value2);
*** 564,574 **** * string value. * * @return The constraint that a matches s. The returned object * will be serialized as an instance of the non-public class * ! * <a href="../../serialized-form.html#javax.management.MatchQueryExp"> * javax.management.MatchQueryExp</a>. */ public static QueryExp initialSubString(AttributeValueExp a, StringValueExp s) { return new MatchQueryExp(a, new StringValueExp(escapeString(s.getValue()) + "*")); --- 564,574 ---- * string value. * * @return The constraint that a matches s. The returned object * will be serialized as an instance of the non-public class * ! * <a href="{@docRoot}/serialized-form.html#javax.management.MatchQueryExp"> * javax.management.MatchQueryExp</a>. */ public static QueryExp initialSubString(AttributeValueExp a, StringValueExp s) { return new MatchQueryExp(a, new StringValueExp(escapeString(s.getValue()) + "*"));
*** 583,593 **** * @param s A string value expression representing the substring. * * @return The constraint that a matches s. The returned object * will be serialized as an instance of the non-public class * ! * <a href="../../serialized-form.html#javax.management.MatchQueryExp"> * javax.management.MatchQueryExp</a>. */ public static QueryExp anySubString(AttributeValueExp a, StringValueExp s) { return new MatchQueryExp(a, new StringValueExp("*" + escapeString(s.getValue()) + "*")); --- 583,593 ---- * @param s A string value expression representing the substring. * * @return The constraint that a matches s. The returned object * will be serialized as an instance of the non-public class * ! * <a href="{@docRoot}/serialized-form.html#javax.management.MatchQueryExp"> * javax.management.MatchQueryExp</a>. */ public static QueryExp anySubString(AttributeValueExp a, StringValueExp s) { return new MatchQueryExp(a, new StringValueExp("*" + escapeString(s.getValue()) + "*"));
*** 603,613 **** * value. * * @return The constraint that a matches s. The returned object * will be serialized as an instance of the non-public class * ! * <a href="../../serialized-form.html#javax.management.MatchQueryExp"> * javax.management.MatchQueryExp</a>. */ public static QueryExp finalSubString(AttributeValueExp a, StringValueExp s) { return new MatchQueryExp(a, new StringValueExp("*" + escapeString(s.getValue()))); --- 603,613 ---- * value. * * @return The constraint that a matches s. The returned object * will be serialized as an instance of the non-public class * ! * <a href="{@docRoot}/serialized-form.html#javax.management.MatchQueryExp"> * javax.management.MatchQueryExp</a>. */ public static QueryExp finalSubString(AttributeValueExp a, StringValueExp s) { return new MatchQueryExp(a, new StringValueExp("*" + escapeString(s.getValue())));
*** 628,638 **** * @param classNameValue The {@link StringValueExp} returning the name * of the class of which selected MBeans should be instances. * @return a query expression that represents an inheritance * constraint on an MBean class. The returned object will be * serialized as an instance of the non-public class ! * <a href="../../serialized-form.html#javax.management.InstanceOfQueryExp"> * javax.management.InstanceOfQueryExp</a>. * @since 1.6 */ public static QueryExp isInstanceOf(StringValueExp classNameValue) { return new InstanceOfQueryExp(classNameValue); --- 628,638 ---- * @param classNameValue The {@link StringValueExp} returning the name * of the class of which selected MBeans should be instances. * @return a query expression that represents an inheritance * constraint on an MBean class. The returned object will be * serialized as an instance of the non-public class ! * <a href="{@docRoot}/serialized-form.html#javax.management.InstanceOfQueryExp"> * javax.management.InstanceOfQueryExp</a>. * @since 1.6 */ public static QueryExp isInstanceOf(StringValueExp classNameValue) { return new InstanceOfQueryExp(classNameValue);
< prev index next >