org.hyperic.sigar.ptql
Class ProcessQueryBuilder
java.lang.Object
org.hyperic.sigar.ptql.ProcessQueryBuilder
- public class ProcessQueryBuilder
- extends java.lang.Object
Build a Process Query using a PTQL string.
Queries must be in the following format:
Class.Attribute.operator=value
Where:
- Class is the name of the Sigar class minus the Proc prefix.
- Attribute is an attribute of the given Class,
index into an array or key in a Map class.
- operator is one of the following for String values:
- eq - Equal to value
- ne - Not Equal to value
- ew - Ends with value
- sw - Starts with value
- ct - Contains value (substring)
- re - Regular expression value matches
- operator is one of the following for numeric values:
- eq - Equal to value
- ne - Not Equal to value
- gt - Greater than value
- ge - Greater than or equal value
- lt - Less than value
- le - Less than or equal value
Multiple queries must delimited by a comma.
Examples can be found in the sigar-bin/lib/.sigar_shellrc file of
the Sigar distribution.
Field Summary |
static java.lang.Class[] |
NOPARAM
|
Method Summary |
void |
append(java.lang.String branch,
java.lang.String val)
|
void |
appendArgsMatch(java.lang.String op,
java.lang.String val)
|
void |
appendArgsOp(int idx,
java.lang.String op,
java.lang.String val)
|
void |
appendEnvOp(java.lang.String key,
java.lang.String op,
java.lang.String val)
|
void |
appendNumberOp(java.lang.String attrClass,
java.lang.String attr,
java.lang.String op,
double val)
|
void |
appendNumberOp(java.lang.String attrClass,
java.lang.String attr,
java.lang.String op,
int val)
|
void |
appendNumberOp(java.lang.String attrClass,
java.lang.String attr,
java.lang.String op,
long val)
|
void |
appendProcPortOp(java.lang.String flags,
java.lang.String op,
int protocol,
long val)
|
void |
appendStringOp(java.lang.String attrClass,
java.lang.String attr,
java.lang.String op,
java.lang.String val)
|
void |
dump(java.io.OutputStream os)
|
void |
finish()
|
java.lang.String |
getClassName()
|
static java.util.Set |
getMethodOpNames(java.lang.reflect.Method method)
|
static java.util.Map |
getMethods()
|
static boolean |
isSigarClass(java.lang.Class type)
|
ProcessQuery |
load()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOPARAM
public static final java.lang.Class[] NOPARAM
ProcessQueryBuilder
public ProcessQueryBuilder()
getMethods
public static java.util.Map getMethods()
getMethodOpNames
public static java.util.Set getMethodOpNames(java.lang.reflect.Method method)
isSigarClass
public static boolean isSigarClass(java.lang.Class type)
getClassName
public java.lang.String getClassName()
appendProcPortOp
public void appendProcPortOp(java.lang.String flags,
java.lang.String op,
int protocol,
long val)
throws MalformedQueryException
- Throws:
MalformedQueryException
appendEnvOp
public void appendEnvOp(java.lang.String key,
java.lang.String op,
java.lang.String val)
throws QueryLoadException,
MalformedQueryException
- Throws:
QueryLoadException
MalformedQueryException
appendArgsOp
public void appendArgsOp(int idx,
java.lang.String op,
java.lang.String val)
throws QueryLoadException,
MalformedQueryException
- Throws:
QueryLoadException
MalformedQueryException
appendArgsMatch
public void appendArgsMatch(java.lang.String op,
java.lang.String val)
throws QueryLoadException,
MalformedQueryException
- Throws:
QueryLoadException
MalformedQueryException
appendStringOp
public void appendStringOp(java.lang.String attrClass,
java.lang.String attr,
java.lang.String op,
java.lang.String val)
throws QueryLoadException,
MalformedQueryException
- Throws:
QueryLoadException
MalformedQueryException
appendNumberOp
public void appendNumberOp(java.lang.String attrClass,
java.lang.String attr,
java.lang.String op,
int val)
throws MalformedQueryException
- Throws:
MalformedQueryException
appendNumberOp
public void appendNumberOp(java.lang.String attrClass,
java.lang.String attr,
java.lang.String op,
long val)
throws MalformedQueryException
- Throws:
MalformedQueryException
appendNumberOp
public void appendNumberOp(java.lang.String attrClass,
java.lang.String attr,
java.lang.String op,
double val)
throws MalformedQueryException
- Throws:
MalformedQueryException
append
public void append(java.lang.String branch,
java.lang.String val)
throws QueryLoadException,
MalformedQueryException
- Throws:
QueryLoadException
MalformedQueryException
finish
public void finish()
load
public ProcessQuery load()
throws QueryLoadException
- Throws:
QueryLoadException
dump
public void dump(java.io.OutputStream os)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2004-2006 Hyperic. All Rights Reserved.