etm.contrib.rrd.rrd4j
Class Rrd4jUtil

java.lang.Object
  extended by etm.contrib.rrd.rrd4j.Rrd4jUtil

public class Rrd4jUtil
extends java.lang.Object

Util class for various RRD4j tasks.

Since:
1.2.0
Version:
$Revision: 246 $
Author:
void.fm

Field Summary
static java.lang.String IMAGE_DESTINATION_FILE_VARIABLE
           
static java.lang.String INTERVALEND_VARIABLE
           
static java.lang.String INTERVALSTART_VARIABLE
           
static java.lang.String RRD_FILE_VARIABLE
           
 
Constructor Summary
Rrd4jUtil()
           
 
Method Summary
 void createGraph(java.net.URL templateUrl, java.io.File rrdFile, java.io.File destination, long intervalStart, long intervalEnd, java.util.Map properties)
          Creates a new image using the given template.
 void createGraph(java.net.URL templateUrl, java.io.File destination, long intervalStart, long intervalEnd, java.util.Map properties)
          Creates a new image using the given template.
 void createGraph(java.net.URL templateUrl, long intervalStart, long intervalEnd, java.util.Map properties)
          Creates a new image using the given template.
 void createGraph(java.net.URL templateUrl, java.util.Map properties)
          Creates a image using the given template URL and properties.
 void createRrdDb(java.net.URL templateUrl, java.io.File rrdFile, java.util.Map properties)
          Creates a new Rrd4j DB using the given template.
 java.net.URL locateTemplate(java.lang.String aTemplate)
          Locates a given template and returns a URL to the template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGE_DESTINATION_FILE_VARIABLE

public static final java.lang.String IMAGE_DESTINATION_FILE_VARIABLE
See Also:
Constant Field Values

RRD_FILE_VARIABLE

public static final java.lang.String RRD_FILE_VARIABLE
See Also:
Constant Field Values

INTERVALSTART_VARIABLE

public static final java.lang.String INTERVALSTART_VARIABLE
See Also:
Constant Field Values

INTERVALEND_VARIABLE

public static final java.lang.String INTERVALEND_VARIABLE
See Also:
Constant Field Values
Constructor Detail

Rrd4jUtil

public Rrd4jUtil()
Method Detail

createGraph

public void createGraph(java.net.URL templateUrl,
                        java.io.File rrdFile,
                        java.io.File destination,
                        long intervalStart,
                        long intervalEnd,
                        java.util.Map properties)
Creates a new image using the given template. Assumes

Parameters:
templateUrl - The templateUrl to use. See RrdGraphDefTemplate for further details.
rrdFile - The rrdfile to use
destination - The image to create.
intervalStart - Start of the rendering interval in seconds.
intervalEnd - End of the rendering interval in seconds.
properties - Optional properties providing variable values for the . May be null.

createGraph

public void createGraph(java.net.URL templateUrl,
                        java.io.File destination,
                        long intervalStart,
                        long intervalEnd,
                        java.util.Map properties)
Creates a new image using the given template. Assumes

Parameters:
templateUrl - The templateUrl to use. See RrdGraphDefTemplate for further details.
destination - The image to create.
intervalStart - Start of the rendering interval in seconds.
intervalEnd - End of the rendering interval in seconds.
properties - Optional properties providing variable values for the . May be null.

createGraph

public void createGraph(java.net.URL templateUrl,
                        long intervalStart,
                        long intervalEnd,
                        java.util.Map properties)
Creates a new image using the given template. Assumes

Parameters:
templateUrl - The templateUrl to use. See RrdGraphDefTemplate for further details.
intervalStart - Start of the rendering interval in seconds.
intervalEnd - End of the rendering interval in seconds.
properties - Optional properties providing variable values for the . May be null.

createGraph

public void createGraph(java.net.URL templateUrl,
                        java.util.Map properties)
Creates a image using the given template URL and properties.

Parameters:
templateUrl - The url to the template, may be a classpath to.
properties - The properties used to replace in the template.

createRrdDb

public void createRrdDb(java.net.URL templateUrl,
                        java.io.File rrdFile,
                        java.util.Map properties)
Creates a new Rrd4j DB using the given template. Always assumes a variable rrdfile in the template that will be replaced with the given file path.

Parameters:
templateUrl - The template url.
rrdFile - The rrdfile to create.
properties - Optional properties providing variable values for the . May be null.
Throws:
EtmException - If the file already exists

locateTemplate

public java.net.URL locateTemplate(java.lang.String aTemplate)
Locates a given template and returns a URL to the template. Translates pre defined templates to their url within the classpat.

Parameters:
aTemplate - A template name, might be predefined template, a classpath resource or file.
Returns:
The URL to the resource
Throws:
EtmException - Thrown to indicate that the given template could not be found.


Copyright © 2004,2005, 2006, 2007 void.fm. All Rights Reserved.