net.stamfest.rrd
Class RRDToolService

java.lang.Object
  extended by net.stamfest.rrd.RRDToolService
All Implemented Interfaces:
RRD, RRDUpdate

public class RRDToolService
extends Object
implements RRD

Author:
peter A java interface to Tobi Oetikers rrdtool. This provides rrd operations to java programs. It puts a layer on top of the actual job to invoke rrdtool functionality. By default, it uses the rrdtool pipe mode of operation with a single instance of rrdtool. It can use other backends as well, eg. a RRDCommandPool. The entire machinery is quite flexible.

Constructor Summary
RRDToolService(RRDCommandPool pool)
           
 
Method Summary
static boolean chdir(RRDCommand rrdcmd, String dir)
           
 CommandResult create(String filename, String[] args)
           
 boolean exists(String filename)
           
protected  void finalize()
           
 RRDCachedClient getCachedClient()
           
static String getCwd(RRDCommand rrdcmd)
           
 CommandResult graphv(String[] cmdin)
           
 CommandResult info(String filename)
           
static boolean mkdir(RRDCommand rrdcmd, String dir)
           
 void setCachedClient(RRDCachedClient cachedClient)
           
 CommandResult tune(String filename, String[] args)
           
 CommandResult update(String filename, String arg)
           
 CommandResult update(String filename, String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RRDToolService

public RRDToolService(RRDCommandPool pool)
Method Detail

info

public CommandResult info(String filename)
                   throws Exception
Specified by:
info in interface RRD
Throws:
Exception

update

public CommandResult update(String filename,
                            String arg)
                     throws Exception
Throws:
Exception

update

public CommandResult update(String filename,
                            String[] args)
                     throws Exception
Specified by:
update in interface RRDUpdate
Throws:
Exception

graphv

public CommandResult graphv(String[] cmdin)
                     throws Exception
Specified by:
graphv in interface RRD
Throws:
Exception

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

getCwd

public static String getCwd(RRDCommand rrdcmd)
                     throws Exception
Throws:
Exception

chdir

public static boolean chdir(RRDCommand rrdcmd,
                            String dir)
                     throws Exception
Throws:
Exception

create

public CommandResult create(String filename,
                            String[] args)
                     throws Exception
Specified by:
create in interface RRD
Throws:
Exception

tune

public CommandResult tune(String filename,
                          String[] args)
                   throws Exception
Specified by:
tune in interface RRD
Throws:
Exception

mkdir

public static boolean mkdir(RRDCommand rrdcmd,
                            String dir)
                     throws Exception
Throws:
Exception

exists

public boolean exists(String filename)
               throws Exception
Throws:
Exception

getCachedClient

public RRDCachedClient getCachedClient()

setCachedClient

public void setCachedClient(RRDCachedClient cachedClient)


Copyright © 2010-2013. All Rights Reserved.