public class GraphListener extends Object implements RateSummaryListener
| Modifier and Type | Field and Description |
|---|---|
(package private) static ConsolFun |
CF |
(package private) static DsType |
DS |
static int |
MAX_ROWS |
(package private) static int |
PERIODS |
static String |
PROP_PERSISTENT |
(package private) static String |
RRD_DIR
note that .jrb files are NOT compatible with .rrd files
|
(package private) static String |
RRD_PREFIX |
(package private) static String |
RRD_SUFFIX |
| Constructor and Description |
|---|
GraphListener(Rate r) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(double totalValue,
long eventCount,
double totalEventTime,
long period)
Called to add rate statistics for a period.
|
(package private) static String |
createName(I2PAppContext ctx,
String wanted)
JRobin can only deal with 20 character data source names, so we need to create a unique,
munged version from the user/developer-visible name.
|
boolean |
equals(Object obj) |
(package private) RrdBackendFactory |
getBackendFactory() |
(package private) RrdDb |
getData() |
(package private) String |
getEventName() |
(package private) String |
getName() |
Rate |
getRate() |
(package private) int |
getRows() |
int |
hashCode() |
(package private) long |
now() |
void |
renderPng(OutputStream out) |
void |
renderPng(OutputStream out,
int width,
int height,
boolean hideLegend,
boolean hideGrid,
boolean hideTitle,
boolean showEvents,
int periodCount,
int end,
boolean showCredit)
Single graph.
|
void |
renderPng(OutputStream out,
int width,
int height,
boolean hideLegend,
boolean hideGrid,
boolean hideTitle,
boolean showEvents,
int periodCount,
int end,
boolean showCredit,
GraphListener lsnr2,
String titleOverride)
Single or two-data-source graph.
|
boolean |
startListening() |
void |
stopListening() |
static final ConsolFun CF
static final DsType DS
public static final int MAX_ROWS
static final int PERIODS
public static final String PROP_PERSISTENT
static final String RRD_DIR
static final String RRD_PREFIX
static final String RRD_SUFFIX
public GraphListener(Rate r)
public void add(double totalValue,
long eventCount,
double totalEventTime,
long period)
RateSummaryListeneradd in interface RateSummaryListenertotalValue - sum of all event values in the most recent periodeventCount - how many events occurredtotalEventTime - how long the events were running forperiod - how long this period isstatic String createName(I2PAppContext ctx, String wanted)
RrdBackendFactory getBackendFactory()
RrdDb getData()
String getEventName()
String getName()
public Rate getRate()
int getRows()
long now()
public void renderPng(OutputStream out) throws IOException
IOExceptionpublic void renderPng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit) throws IOException
end - number of periods before nowIOExceptionpublic void renderPng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit, GraphListener lsnr2, String titleOverride) throws IOException
lsnr2 - 2nd data source to plot on same graph, or null. Not recommended for events.titleOverride - If non-null, overrides the titleIOExceptionpublic boolean startListening()
public void stopListening()