public class GraphGenerator extends Object implements Runnable, ClientApp
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DATABASES |
| Constructor and Description |
|---|
GraphGenerator(RouterContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
int |
countGraphs() |
String |
getDisplayName()
The display name of the ClientApp, used in user interfaces.
|
List<GraphListener> |
getListeners()
List of GraphListener instances
|
String |
getName()
The generic name of the ClientApp, used for registration,
e.g.
|
ClientAppState |
getState()
The current state of the ClientApp.
|
boolean |
getXML(Rate rate,
OutputStream out) |
static GraphGenerator |
instance() |
static GraphGenerator |
instance(I2PAppContext ctx) |
static boolean |
isDisabled(I2PAppContext ctx) |
Set<Rate> |
parseSpecs(String specs) |
boolean |
renderPng(Rate rate,
OutputStream out) |
boolean |
renderPng(Rate rate,
OutputStream out,
int width,
int height,
boolean hideLegend,
boolean hideGrid,
boolean hideTitle,
boolean showEvents,
int periodCount,
int end,
boolean showCredit)
This does the single data graphs.
|
boolean |
renderRatePng(OutputStream out,
int width,
int height,
boolean hideLegend,
boolean hideGrid,
boolean hideTitle,
boolean showEvents,
int periodCount,
int end,
boolean showCredit)
This does the two-data bandwidth graph only.
|
void |
run() |
(package private) void |
setDisabled()
Disable graph generation until restart
See GraphRenderer.render()
|
(package private) static void |
setDisabled(I2PAppContext ctx)
Disable graph generation until restart
See GraphRenderer.render()
|
void |
shutdown(String[] args)
Does nothing, we aren't tracked
|
void |
startup()
Does nothing, we aren't tracked
|
void |
stop() |
public static final String DEFAULT_DATABASES
public GraphGenerator(RouterContext ctx)
public int countGraphs()
public String getDisplayName()
ClientAppgetDisplayName in interface ClientApppublic List<GraphListener> getListeners()
public String getName()
ClientApppublic ClientAppState getState()
ClientApppublic boolean getXML(Rate rate, OutputStream out) throws IOException
IOExceptionpublic static GraphGenerator instance()
public static GraphGenerator instance(I2PAppContext ctx)
public static boolean isDisabled(I2PAppContext ctx)
public Set<Rate> parseSpecs(String specs)
specs - statName.period,statName.period,statName.periodpublic boolean renderPng(Rate rate, OutputStream out) throws IOException
IOExceptionpublic boolean renderPng(Rate rate, 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 boolean renderRatePng(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 nowIOExceptionvoid setDisabled()
static void setDisabled(I2PAppContext ctx)
public void shutdown(String[] args)
public void startup()
public void stop()