org.hyperic.sigar.ptql
Class ProcessQueryBuilder

java.lang.Object
  extended byorg.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: 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
           
 
Constructor Summary
ProcessQueryBuilder()
           
 
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
 

Field Detail

NOPARAM

public static final java.lang.Class[] NOPARAM
Constructor Detail

ProcessQueryBuilder

public ProcessQueryBuilder()
Method Detail

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.