## net.i2p.router.web
Class SummaryHelper

    java.lang.Object
      net.i2p.router.web.HelperBase
          net.i2p.router.web.SummaryHelper

    public class SummaryHelper

extends HelperBase

Simple helper to query the appropriate router for data necessary to render the summary sections on the router console.

Field Summary
`(package private) static String` `THINSP`

Fields inherited from class net.i2p.router.web.HelperBase
`_context, _out`

Constructor Summary
`SummaryHelper()`

Method Summary
`boolean` `allowReseed()` this displayed offset, not skew - now handled in reachability() private String timeSkew() { if (_context == null) return ""; //if (!_context.clock().getUpdatedSuccessfully()) // return " (Unknown skew)"; long ms = _context.clock().getOffset(); long diff = Math.abs(ms); if (diff < 3000) return ""; return " (" + DataHelper.formatDuration2(diff) + " " + _("skew") + ")"; }
`String` `getAction()`
`int` `getActivePeers()` How many peers we are talking to now
`int` `getActiveProfiles()` How many active identities have we spoken with recently
`int` `getAllPeers()` subtract one for ourselves, so if we know no other peers it displays zero
`String` `getConsoleNonce()`
`String` `getDestinations()` Client destinations connected locally.
`int` `getFastPeers()` How many active peers the router ranks as fast.
`String` `getFiveMinuteKBps()`
`int` `getHighCapacityPeers()` How many active peers the router ranks as having a high capacity.
`String` `getIdent()` Retrieve the shortened 4 character ident for the router located within the current JVM at the given context.
`String` `getInboundBacklog()`
`int` `getInboundClientTunnels()` How many inbound client tunnels we have.
`String` `getInboundTransferred()` How much data have we received since the router started (pretty printed string with 2 decimal places and the appropriate units - GB/MB/KB/bytes)
`int` `getInboundTunnels()` How many free inbound tunnels we have.
`String` `getJobLag()` How lagged our job queue is over the last minute (pretty printed with the units attached)
`String` `getLifetimeKBps()`
`String` `getMessageDelay()` How long it takes us to pump out a message, averaged over the last minute (pretty printed with the units attached)
`int` `getOutboundClientTunnels()` How many active outbound client tunnels we have.
`String` `getOutboundTransferred()` How much data have we sent since the router started (pretty printed string with 2 decimal places and the appropriate units - GB/MB/KB/bytes)
`int` `getOutboundTunnels()` How many active outbound tunnels we have.
`int` `getParticipatingTunnels()` How many tunnels we are participating in.
`String` `getReachability()`
`String` `getRequestURI()`
`String` `getSecondKBps()`
`String` `getShareRatio()`
`String` `getTunnelLag()` How long it takes us to test our tunnels, averaged over the last 10 minutes (pretty printed with the units attached)
`String` `getTunnelStatus()`
`String` `getUnsignedUpdateVersion()`
`String` `getUpdateNonce()`
`String` `getUpdateVersion()`
`String` `getUptime()` Retrieve a pretty printed uptime count (ala 4d or 7h or 39m)
`String` `getVersion()` Retrieve the version number of the router.
`int` `getWellIntegratedPeers()` How many active peers the router ranks as well integrated.
`void` `renderSummaryBar()` output the summary bar to _out
`void` `setAction(String s)`
`void` `setConsoleNonce(String s)`
`void` `setRequestURI(String s)`
`void` `setUpdateNonce(String s)`
`boolean` `showFirewallWarning()` Should we warn about a possible firewall problem?
`boolean` `unsignedUpdateAvailable()`

`boolean`

`updateAvailable()`
public String getPRNGStatus() { Rate r = _context.statManager().getRate("prng.bufferWaitTime").getRate(60*1000); int use = (int) r.getLastEventCount(); int i = (int) (r.getAverageValue() + 0.5); if (i <= 0) { r = _context.statManager().getRate("prng.bufferWaitTime").getRate(10*60*1000); i = (int) (r.getAverageValue() + 0.5); } String rv = i + "/"; r = _context.statManager().getRate("prng.bufferFillTime").getRate(60*1000); i = (int) (r.getAverageValue() + 0.5); if (i <= 0) { r = _context.statManager().getRate("prng.bufferFillTime").getRate(10*60*1000); i = (int) (r.getAverageValue() + 0.5); } rv = rv + i + "ms"; // margin == fill time / use time if (use > 0 && i > 0) rv = rv + ' ' + (60*1000 / (use * i)) + 'x'; return rv; }

Methods inherited from class net.i2p.router.web.HelperBase
`_, _, _, _x, ngettext, setContextId, storeWriter`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### THINSP

    static final String THINSP

See Also:
  Constant Field Values

Constructor Detail

### SummaryHelper

    public SummaryHelper()

Method Detail

### getIdent

    public String getIdent()

  Retrieve the shortened 4 character ident for the router located within the current JVM at the given context.

### getVersion

    public String getVersion()

  Retrieve the version number of the router.

### getUptime

    public String getUptime()

  Retrieve a pretty printed uptime count (ala 4d or 7h or 39m)

### allowReseed

    public boolean allowReseed()

  this displayed offset, not skew - now handled in reachability() private String timeSkew() { if (_context == null) return ""; //if (!_context.clock().getUpdatedSuccessfully()) // return " (Unknown skew)"; long ms = _context.clock().getOffset(); long diff = Math.abs(ms); if (diff < 3000) return ""; return " (" + DataHelper.formatDuration2(diff) + " " + _("skew") + ")"; }

### getAllPeers

    public int getAllPeers()

  subtract one for ourselves, so if we know no other peers it displays zero

### getReachability

    public String getReachability()

### getActivePeers

    public int getActivePeers()

  How many peers we are talking to now

### showFirewallWarning

    public boolean showFirewallWarning()

  Should we warn about a possible firewall problem?

### getActiveProfiles

    public int getActiveProfiles()

  How many active identities have we spoken with recently

### getFastPeers

    public int getFastPeers()

  How many active peers the router ranks as fast.

### getHighCapacityPeers

    public int getHighCapacityPeers()

  How many active peers the router ranks as having a high capacity.

### getWellIntegratedPeers

    public int getWellIntegratedPeers()

  How many active peers the router ranks as well integrated.

### getSecondKBps

    public String getSecondKBps()

  Returns:
    "x.xx / y.yy {K|M}"

### getFiveMinuteKBps

    public String getFiveMinuteKBps()

  Returns:
    "x.xx / y.yy {K|M}"

### getLifetimeKBps

    public String getLifetimeKBps()

  Returns:
    "x.xx / y.yy {K|M}"

### getInboundTransferred

    public String getInboundTransferred()

  How much data have we received since the router started (pretty printed string with 2 decimal places and the appropriate units - GB/MB/KB/bytes)

### getOutboundTransferred

    public String getOutboundTransferred()

  How much data have we sent since the router started (pretty printed string with 2 decimal places and the appropriate units - GB/MB/KB/bytes)

### getDestinations

    public String getDestinations()

  Client destinations connected locally.

  Returns:
    html section summary

### getInboundTunnels

    public int getInboundTunnels()

  How many free inbound tunnels we have.

### getOutboundTunnels

    public int getOutboundTunnels()

  How many active outbound tunnels we have.

### getInboundClientTunnels

    public int getInboundClientTunnels()

  How many inbound client tunnels we have.

### getOutboundClientTunnels

    public int getOutboundClientTunnels()

  How many active outbound client tunnels we have.

### getParticipatingTunnels

    public int getParticipatingTunnels()

  How many tunnels we are participating in.

### getShareRatio

    public String getShareRatio()

  Since:
    0.7.10

### getJobLag

    public String getJobLag()

  How lagged our job queue is over the last minute (pretty printed with the units attached)

### getMessageDelay

    public String getMessageDelay()

  How long it takes us to pump out a message, averaged over the last minute (pretty printed with the units attached)

### getTunnelLag

    public String getTunnelLag()

  How long it takes us to test our tunnels, averaged over the last 10 minutes (pretty printed with the units attached)

### getTunnelStatus

    public String getTunnelStatus()

### getInboundBacklog

    public String getInboundBacklog()

### updateAvailable

    public boolean updateAvailable()

  public String getPRNGStatus() { Rate r = _context.statManager().getRate("prng.bufferWaitTime").getRate(60*1000); int use = (int) r.getLastEventCount(); int i = (int) (r.getAverageValue() + 0.5); if (i <= 0) { r = _context.statManager().getRate("prng.bufferWaitTime").getRate(10*60*1000); i = (int) (r.getAverageValue() + 0.5); } String rv = i + "/"; r = _context.statManager().getRate("prng.bufferFillTime").getRate(60*1000); i = (int) (r.getAverageValue() + 0.5); if (i <= 0) { r = _context.statManager().getRate("prng.bufferFillTime").getRate(10*60*1000); i = (int) (r.getAverageValue() + 0.5); } rv = rv + i + "ms"; // margin == fill time / use time if (use > 0 && i > 0) rv = rv + ' ' + (60*1000 / (use * i)) + 'x'; return rv; }

### unsignedUpdateAvailable

    public boolean unsignedUpdateAvailable()

### getUpdateVersion

    public String getUpdateVersion()

### getUnsignedUpdateVersion

    public String getUnsignedUpdateVersion()

### renderSummaryBar

    public void renderSummaryBar()
                          throws IOException

  output the summary bar to _out

  Throws:
    `IOException`

### setAction

    public void setAction(String s)

### getAction

    public String getAction()

### setConsoleNonce

    public void setConsoleNonce(String s)

### getConsoleNonce

    public String getConsoleNonce()

### setUpdateNonce

    public void setUpdateNonce(String s)

### getUpdateNonce

    public String getUpdateNonce()

### setRequestURI

    public void setRequestURI(String s)

### getRequestURI

    public String getRequestURI()