java.lang.Object | |
↳ | javax.management.Query |
Constructs query object constraints. The static methods provided return query expressions that may be used in listing and enumerating MBeans. Individual constraint construction methods allow only appropriate types as arguments. Composition of calls can construct arbitrary nestings of constraints, as the following example illustrates:
QueryExp exp = Query.and(Query.gt(Query.attr("age"),Query.value(5)), Query.match(Query.attr("name"), Query.value("Smith")));
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DIV | A code representing the div(ValueExp, ValueExp) expression. |
|||||||||
int | EQ | A code representing the eq(ValueExp, ValueExp) query. |
|||||||||
int | GE | A code representing the geq(ValueExp, ValueExp) query. |
|||||||||
int | GT | A code representing the gt(ValueExp, ValueExp) query. |
|||||||||
int | LE | A code representing the leq(ValueExp, ValueExp) query. |
|||||||||
int | LT | A code representing the lt(ValueExp, ValueExp) query. |
|||||||||
int | MINUS | A code representing the minus(ValueExp, ValueExp) expression. |
|||||||||
int | PLUS | A code representing the plus(ValueExp, ValueExp) expression. |
|||||||||
int | TIMES | A code representing the times(ValueExp, ValueExp) expression. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Basic constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a query expression that is the conjunction of two other query
expressions.
| |||||||||||
Returns a query expression that represents a matching constraint on
a string argument.
| |||||||||||
Returns a new qualified attribute expression. | |||||||||||
Returns a new attribute expression. | |||||||||||
Returns a query expression that represents the constraint that one
value is between two other values.
| |||||||||||
Returns a new class attribute expression which can be used in any Query call that expects a ValueExp. | |||||||||||
Returns a binary expression representing the quotient of two numeric
values.
| |||||||||||
Returns a query expression that represents an equality constraint on
two values.
| |||||||||||
Returns a query expression that represents a matching constraint on
a string argument.
| |||||||||||
Returns a query expression that represents a "greater than or equal
to" constraint on two values.
| |||||||||||
Returns a query expression that represents a "greater than" constraint on
two values.
| |||||||||||
Returns an expression constraining a value to be one of an explicit list.
| |||||||||||
Returns a query expression that represents a matching constraint on
a string argument.
| |||||||||||
Returns a query expression that represents an inheritance constraint
on an MBean class.
| |||||||||||
Returns a query expression that represents a "less than or equal to"
constraint on two values.
| |||||||||||
Returns a query expression that represents a "less than" constraint on
two values.
| |||||||||||
Returns a query expression that represents a matching constraint on
a string argument.
| |||||||||||
Returns a binary expression representing the difference between two numeric
values.
| |||||||||||
Returns a constraint that is the negation of its argument.
| |||||||||||
Returns a query expression that is the disjunction of two other query
expressions.
| |||||||||||
Returns a binary expression representing the sum of two numeric values,
or the concatenation of two string values.
| |||||||||||
Returns a binary expression representing the product of two numeric values.
| |||||||||||
Returns a numeric value expression that can be used in any Query call
that expects a ValueExp.
| |||||||||||
Returns a numeric value expression that can be used in any Query call
that expects a ValueExp.
| |||||||||||
Returns a boolean value expression that can be used in any Query call
that expects a ValueExp.
| |||||||||||
Returns a numeric value expression that can be used in any Query call
that expects a ValueExp.
| |||||||||||
Returns a numeric value expression that can be used in any Query call
that expects a ValueExp.
| |||||||||||
Returns a numeric value expression that can be used in any Query call
that expects a ValueExp.
| |||||||||||
Returns a new string expression.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
A code representing the div(ValueExp, ValueExp)
expression. This is
chiefly of interest for the serialized form of queries.
A code representing the eq(ValueExp, ValueExp)
query. This is chiefly
of interest for the serialized form of queries.
A code representing the geq(ValueExp, ValueExp)
query. This is chiefly
of interest for the serialized form of queries.
A code representing the gt(ValueExp, ValueExp)
query. This is chiefly
of interest for the serialized form of queries.
A code representing the leq(ValueExp, ValueExp)
query. This is chiefly
of interest for the serialized form of queries.
A code representing the lt(ValueExp, ValueExp)
query. This is chiefly
of interest for the serialized form of queries.
A code representing the minus(ValueExp, ValueExp)
expression. This
is chiefly of interest for the serialized form of queries.
A code representing the plus(ValueExp, ValueExp)
expression. This
is chiefly of interest for the serialized form of queries.
A code representing the times(ValueExp, ValueExp)
expression. This
is chiefly of interest for the serialized form of queries.
Basic constructor.
Returns a query expression that is the conjunction of two other query expressions.
q1 | A query expression. |
---|---|
q2 | Another query expression. |
Returns a query expression that represents a matching constraint on a string argument. The value must contain the given literal string value.
a | An attribute expression. |
---|---|
s | A string value expression representing the substring. |
Returns a new qualified attribute expression.
Evaluating this expression for a given
objectName
includes performing MBeanServer.getObjectInstance(objectName)
and MBeanServer.getAttribute(objectName,
name)
.
className | The name of the class possessing the attribute. |
---|---|
name | The name of the attribute. |
Returns a new attribute expression.
Evaluating this expression for a given
objectName
includes performing MBeanServer.getAttribute(objectName,
name)
.
name | The name of the attribute. |
---|
Returns a query expression that represents the constraint that one value is between two other values.
v1 | A value expression that is "between" v2 and v3. |
---|---|
v2 | Value expression that represents a boundary of the constraint. |
v3 | Value expression that represents a boundary of the constraint. |
Returns a new class attribute expression which can be used in any Query call that expects a ValueExp.
Evaluating this expression for a given
objectName
includes performing MBeanServer.getObjectInstance(objectName)
.
Returns a binary expression representing the quotient of two numeric values.
value1 | The first '/' operand. |
---|---|
value2 | The second '/' operand. |
op
equal to
DIV
.
Returns a query expression that represents an equality constraint on two values.
v1 | A value expression. |
---|---|
v2 | Another value expression. |
relOp
equal
to EQ
.
Returns a query expression that represents a matching constraint on a string argument. The value must end with the given literal string value.
a | An attribute expression. |
---|---|
s | A string value expression representing the end of the string value. |
Returns a query expression that represents a "greater than or equal to" constraint on two values.
v1 | A value expression. |
---|---|
v2 | Another value expression. |
relOp
equal
to GE
.
Returns a query expression that represents a "greater than" constraint on two values.
v1 | A value expression. |
---|---|
v2 | Another value expression. |
relOp
equal
to GT
.
Returns an expression constraining a value to be one of an explicit list.
val | A value to be constrained. |
---|---|
valueList | An array of ValueExps. |
Returns a query expression that represents a matching constraint on a string argument. The value must start with the given literal string value.
a | An attribute expression. |
---|---|
s | A string value expression representing the beginning of the string value. |
Returns a query expression that represents an inheritance constraint on an MBean class.
Example: to find MBeans that are instances of
NotificationBroadcaster
, use
Query.isInstanceOf(Query.value(NotificationBroadcaster.class.getName()))
.
Evaluating this expression for a given
objectName
includes performing MBeanServer.isInstanceOf(objectName,
((StringValueExp)classNameValue.apply(objectName)).getValue()
.
classNameValue | The StringValueExp returning the name
of the class of which selected MBeans should be instances. |
---|
Returns a query expression that represents a "less than or equal to" constraint on two values.
v1 | A value expression. |
---|---|
v2 | Another value expression. |
relOp
equal
to LE
.
Returns a query expression that represents a "less than" constraint on two values.
v1 | A value expression. |
---|---|
v2 | Another value expression. |
relOp
equal
to LT
.
Returns a query expression that represents a matching constraint on
a string argument. The matching syntax is consistent with file globbing:
supports "?
", "*
", "[
",
each of which may be escaped with "\
";
character classes may use "!
" for negation and
"-
" for range.
(*
for any character sequence,
?
for a single arbitrary character,
[...]
for a character sequence).
For example: a*b?c
would match a string starting
with the character a
, followed
by any number of characters, followed by a b
,
any single character, and a c
.
a | An attribute expression |
---|---|
s | A string value expression representing a matching constraint |
Returns a binary expression representing the difference between two numeric values.
value1 | The first '-' operand. |
---|---|
value2 | The second '-' operand. |
op
equal to
MINUS
.
Returns a constraint that is the negation of its argument.
queryExp | The constraint to negate. |
---|
Returns a query expression that is the disjunction of two other query expressions.
q1 | A query expression. |
---|---|
q2 | Another query expression. |
Returns a binary expression representing the sum of two numeric values, or the concatenation of two string values.
value1 | The first '+' operand. |
---|---|
value2 | The second '+' operand. |
op
equal to
PLUS
.
Returns a binary expression representing the product of two numeric values.
value1 | The first '*' operand. |
---|---|
value2 | The second '*' operand. |
op
equal to
TIMES
.
Returns a numeric value expression that can be used in any Query call that expects a ValueExp.
val | A double value. |
---|
Returns a numeric value expression that can be used in any Query call that expects a ValueExp.
val | A long value. |
---|
Returns a boolean value expression that can be used in any Query call that expects a ValueExp.
val | A boolean value. |
---|
Returns a numeric value expression that can be used in any Query call that expects a ValueExp.
val | A float value. |
---|
Returns a numeric value expression that can be used in any Query call that expects a ValueExp.
val | An int value. |
---|
Returns a numeric value expression that can be used in any Query call that expects a ValueExp.
val | An instance of Number. |
---|
Returns a new string expression.
val | The string value. |
---|