org.hyperic.sigar
Class SigarInvoker

java.lang.Object
  extended by org.hyperic.sigar.SigarInvoker

public class SigarInvoker
extends java.lang.Object

This class provides a string-ish interface to sigar. It is intended for use via JMX and Hyperic HQ measurement plugins. Method lookups are cached and the like for better performance.


Constructor Summary
protected SigarInvoker()
           
  SigarInvoker(SigarProxy proxy, java.lang.String type)
           
 
Method Summary
 java.lang.String getType()
          The type of this instance, as passed to the constructor.
 java.lang.Object invoke(java.lang.Object[] args, java.lang.String attr)
           
 java.lang.Object invoke(java.lang.Object arg, java.lang.String attr)
           
protected  void setProxy(SigarProxy proxy)
           
protected  void setType(java.lang.String val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SigarInvoker

protected SigarInvoker()

SigarInvoker

public SigarInvoker(SigarProxy proxy,
                    java.lang.String type)
Parameters:
proxy - SigarProxy implementation such as SigarProxyCache
type - The sigar type. Valid name is any of the SigarProxy interface methods (minus the 'get' prefix).
Method Detail

setProxy

protected void setProxy(SigarProxy proxy)

setType

protected void setType(java.lang.String val)

getType

public java.lang.String getType()
The type of this instance, as passed to the constructor.


invoke

public java.lang.Object invoke(java.lang.Object arg,
                               java.lang.String attr)
                        throws SigarException,
                               SigarNotImplementedException,
                               SigarPermissionDeniedException
Throws:
SigarException
SigarNotImplementedException
SigarPermissionDeniedException

invoke

public java.lang.Object invoke(java.lang.Object[] args,
                               java.lang.String attr)
                        throws SigarException,
                               SigarNotImplementedException,
                               SigarPermissionDeniedException
Throws:
SigarException
SigarNotImplementedException
SigarPermissionDeniedException


Copyright ? 2004-2009 Hyperic. All Rights Reserved.