|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.web.HelperBase
net.i2p.router.web.SummaryHelper
public class SummaryHelper
Simple helper to query the appropriate router for data necessary to render the summary sections on the router console.
Field Summary |
---|
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.formatDuration(diff) + " " + _("skew") + ")"; } |
java.lang.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 |
java.lang.String |
getConsoleNonce()
|
java.lang.String |
getDestinations()
Client destinations connected locally. |
int |
getFastPeers()
How many active peers the router ranks as fast. |
int |
getHighCapacityPeers()
How many active peers the router ranks as having a high capacity. |
java.lang.String |
getIdent()
Retrieve the shortened 4 character ident for the router located within the current JVM at the given context. |
java.lang.String |
getInboundBacklog()
|
int |
getInboundClientTunnels()
How many inbound client tunnels we have. |
java.lang.String |
getInboundFiveMinuteKBps()
How fast we have been receiving data over the last 5 minutes (pretty printed string with 2 decimal places representing the KBps) |
java.lang.String |
getInboundLifetimeKBps()
How fast we have been receiving data since the router started (pretty printed string with 2 decimal places representing the KBps) |
java.lang.String |
getInboundSecondKBps()
How fast we have been receiving data over the last second (pretty printed string with 2 decimal places representing the KBps) |
java.lang.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. |
java.lang.String |
getJobLag()
How lagged our job queue is over the last minute (pretty printed with the units attached) |
java.lang.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. |
java.lang.String |
getOutboundFiveMinuteKBps()
How fast we have been sending data over the last 5 minutes (pretty printed string with 2 decimal places representing the KBps) |
java.lang.String |
getOutboundLifetimeKBps()
How fast we have been sending data since the router started (pretty printed string with 2 decimal places representing the KBps) |
java.lang.String |
getOutboundSecondKBps()
How fast we have been sending data over the last second (pretty printed string with 2 decimal places representing the KBps) |
java.lang.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. |
java.lang.String |
getReachability()
|
java.lang.String |
getRequestURI()
|
java.lang.String |
getShareRatio()
|
java.lang.String |
getTunnelLag()
How long it takes us to test our tunnels, averaged over the last 10 minutes (pretty printed with the units attached) |
java.lang.String |
getTunnelStatus()
|
java.lang.String |
getUnsignedUpdateVersion()
|
java.lang.String |
getUpdateNonce()
|
java.lang.String |
getUpdateVersion()
|
java.lang.String |
getUptime()
Retrieve a pretty printed uptime count (ala 4d or 7h or 39m) |
java.lang.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(java.lang.String s)
|
void |
setConsoleNonce(java.lang.String s)
|
void |
setRequestURI(java.lang.String s)
|
void |
setUpdateNonce(java.lang.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, setContextId, setWriter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SummaryHelper()
Method Detail |
---|
public java.lang.String getIdent()
public java.lang.String getVersion()
public java.lang.String getUptime()
public boolean allowReseed()
public int getAllPeers()
public java.lang.String getReachability()
public int getActivePeers()
public boolean showFirewallWarning()
public int getActiveProfiles()
public int getFastPeers()
public int getHighCapacityPeers()
public int getWellIntegratedPeers()
public java.lang.String getInboundSecondKBps()
public java.lang.String getOutboundSecondKBps()
public java.lang.String getInboundFiveMinuteKBps()
public java.lang.String getOutboundFiveMinuteKBps()
public java.lang.String getInboundLifetimeKBps()
public java.lang.String getOutboundLifetimeKBps()
public java.lang.String getInboundTransferred()
public java.lang.String getOutboundTransferred()
public java.lang.String getDestinations()
public int getInboundTunnels()
public int getOutboundTunnels()
public int getInboundClientTunnels()
public int getOutboundClientTunnels()
public int getParticipatingTunnels()
public java.lang.String getShareRatio()
public java.lang.String getJobLag()
public java.lang.String getMessageDelay()
public java.lang.String getTunnelLag()
public java.lang.String getTunnelStatus()
public java.lang.String getInboundBacklog()
public boolean updateAvailable()
public boolean unsignedUpdateAvailable()
public java.lang.String getUpdateVersion()
public java.lang.String getUnsignedUpdateVersion()
public void renderSummaryBar() throws java.io.IOException
java.io.IOException
public void setAction(java.lang.String s)
public java.lang.String getAction()
public void setConsoleNonce(java.lang.String s)
public java.lang.String getConsoleNonce()
public void setUpdateNonce(java.lang.String s)
public java.lang.String getUpdateNonce()
public void setRequestURI(java.lang.String s)
public java.lang.String getRequestURI()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |