net.i2p.router.web

## Class SummaryListener

- java.lang.Object
- - net.i2p.router.web.SummaryListener

- All Implemented Interfaces:
    RateSummaryListener

       class SummaryListener
      extends Object
      implements RateSummaryListener

  Creates and updates the in-memory or on-disk RRD database, and provides methods to generate graphs of the data
  Since:
    0.6.1.13

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) static String` | `CF`
    `(package private) static int` | `PERIODS`
    `(package private) static String` | `PROP_PERSISTENT`
    `(package private) static String` | `RRD_DIR` note that .jrb files are NOT compatible with .rrd files

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SummaryListener(Rate r)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(double totalValue, long eventCount, double totalEventTime, long 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) String` | `getBackendName()`
    `(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, boolean showCredit)`
    `boolean` | `startListening()`
    `void` | `stopListening()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PROP_PERSISTENT

          static final String PROP_PERSISTENT

      See Also:
        Constant Field Values

    - #### RRD_DIR

          static final String RRD_DIR

      note that .jrb files are NOT compatible with .rrd files
      See Also:
        Constant Field Values

    - #### CF

          static final String CF

      See Also:
        Constant Field Values

    - #### PERIODS

          static final int PERIODS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SummaryListener

          public SummaryListener(Rate r)

  - ### Method Detail

    - #### add

          public void add(double totalValue,
                 long eventCount,
                 double totalEventTime,
                 long period)

      Specified by:
        `add` in interface `RateSummaryListener`
      Parameters:
        `totalValue` - sum of all event values in the most recent period
        `eventCount` - how many events occurred
        `totalEventTime` - how long the events were running for
        `period` - how long this period is

    - #### createName

          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.

    - #### getRate

          public Rate getRate()

    - #### startListening

          public boolean startListening()

      Returns:
        success

    - #### stopListening

          public void stopListening()

    - #### renderPng

          public void renderPng(OutputStream out,
                       int width,
                       int height,
                       boolean hideLegend,
                       boolean hideGrid,
                       boolean hideTitle,
                       boolean showEvents,
                       int periodCount,
                       boolean showCredit)
                         throws IOException

      Throws:
        `IOException`

    - #### renderPng

          public void renderPng(OutputStream out)
                         throws IOException

      Throws:
        `IOException`

    - #### getName

          String getName()

    - #### getEventName

          String getEventName()

    - #### getData

          RrdDb getData()

    - #### now

          long now()

    - #### getBackendName

          String getBackendName()

      Since:
        0.8.7

    - #### getRows

          int getRows()

      Since:
        0.8.7

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`