org.opennms.netmgt.rrd
Interface RrdGraphDetails

All Known Implementing Classes:
DefaultRrdGraphDetails

public interface RrdGraphDetails

Container for details from an RRD graph. Stores the graph image (if any) and details relating to the graph.

Author:
DJ Gregor

Method Summary
 int getHeight()
          Gets the height of the PNG image.
 InputStream getInputStream()
          Gets the PNG image representing the graph.
 String[] getPrintLines()
          Gets the PRINT lines associated with the graph command.
 int getWidth()
          Gets the width of the PNG image.
 

Method Detail

getInputStream

InputStream getInputStream()
                           throws RrdException
Gets the PNG image representing the graph. If a graph wasn't created, an RrdException will be thrown.

Returns:
InputStream containg a PNG image representing the graph
Throws:
RrdException - if there is an error getting an input stream for the graph, such as if no graph image was created

getPrintLines

String[] getPrintLines()
                       throws RrdException
Gets the PRINT lines associated with the graph command.

Returns:
PRINT lines associated with the graph command. If there were no PRINT lines, an empty array is returned.
Throws:
RrdException - if there is an error getting the PRINT lines

getHeight

int getHeight()
              throws RrdException
Gets the height of the PNG image.

Returns:
height of the PNG image in pixels. This is the height of the entire PNG image, not just the height of the graph box within the image.
Throws:
RrdException - if no graph image was produced or if there is an error getting the height

getWidth

int getWidth()
             throws RrdException
Gets the width of the PNG image.

Returns:
width of the PNG image in pixels. This is the width of the entire PNG image, not just the width of the graph box within the image.
Throws:
RrdException - if no graph image was produced or if there is an error getting the height


Copyright © 2009. All Rights Reserved.