Package net.i2p.router.web.helpers
Class SummaryHelper
- java.lang.Object
- 
- net.i2p.router.web.HelperBase
- 
- net.i2p.router.web.helpers.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. For the full summary bar use renderSummaryBar()
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSummaryHelper.NetworkStatestatic classSummaryHelper.NetworkStateMessageState message to be displayed to the user in the summary bar.
 - 
Field SummaryFields Modifier and Type Field Description (package private) static StringDEFAULT_FULL(package private) static StringDEFAULT_FULL_ADVANCED(package private) static StringDEFAULT_MINIMAL(package private) static StringDEFAULT_MINIMAL_ADVANCED(package private) static StringPROP_SUMMARYBAR(package private) static StringTHINSP- 
Fields inherited from class net.i2p.router.web.HelperBase_context, _out, CHECKED, PROP_ADVANCED, SELECTED
 
- 
 - 
Constructor SummaryConstructors Constructor Description SummaryHelper()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowReseed()allowReseedStringgetAction()intgetActivePeers()How many peers we are talking to nowintgetActiveProfiles()How many active identities have we spoken with recentlyintgetAllPeers()subtract one for ourselves, so if we know no other peers it displays zerointgetBanlistedPeers()How many peers are banned.StringgetConfigTable()StringgetConsoleNonce()StringgetDestinations()Client destinations connected locally.intgetFailingPeers()How many peers the router ranks as failing.intgetFastPeers()How many active peers the router ranks as fast.StringgetFirewallAndReseedStatus()The firewall status and reseed status/buttonsStringgetFiveMinuteKBps()intgetHighCapacityPeers()How many active peers the router ranks as having a high capacity.StringgetIdent()Retrieve the shortened 4 character ident for the router located within the current JVM at the given context.StringgetInboundBacklog()intgetInboundClientTunnels()How many inbound client tunnels we have.StringgetInboundTransferred()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)intgetInboundTunnels()How many free inbound tunnels we have.StringgetJobLag()How lagged our job queue is over the last minute (pretty printed with the units attached)StringgetLifetimeKBps()StringgetMemory()Retrieve amount of used memory.StringgetMemoryBar()StringgetMessageDelay()How long it takes us to pump out a message, averaged over the last minute (pretty printed with the units attached)NewsHelpergetNewsHelper()intgetOutboundClientTunnels()How many active outbound client tunnels we have.StringgetOutboundTransferred()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)intgetOutboundTunnels()How many active outbound tunnels we have.intgetParticipatingTunnels()How many tunnels we are participating in.SummaryHelper.NetworkStateMessagegetReachability()StringgetRequestURI()StringgetRestartStatus()The restart status and buttonsStringgetSecondKBps()StringgetShareRatio()List<String>getSummaryBarSections(String page)StringgetTunnelLag()How long it takes us to test our tunnels, averaged over the last 10 minutes (pretty printed with the units attached)StringgetTunnelStatus()StringgetUpdateNonce()StringgetUpdateStatus()The update status and buttonsStringgetUptime()Retrieve a pretty printed uptime count (ala 4d or 7h or 39m)StringgetVersion()Retrieve the version number of the router.intgetWellIntegratedPeers()How many active peers the router ranks as well integrated.voidrenderSummaryBar()output the summary bar to _out(package private) static voidsaveSummaryBarSections(RouterContext ctx, String page, Map<Integer,String> sections)voidsetAction(String s)voidsetConsoleNonce(String s)voidsetRequestURI(String s)voidsetUpdateNonce(String s)booleanshowFirewallWarning()Should we warn about a possible firewall problem?voidstoreNewsHelper(NewsHelper n)- 
Methods inherited from class net.i2p.router.web.HelperBase_t, _t, _t, _x, getChecked, isAdvanced, ngettext, setContextId, storeWriter
 
- 
 
- 
- 
- 
Field Detail- 
THINSPstatic final String THINSP - See Also:
- Constant Field Values
 
 - 
PROP_SUMMARYBARstatic final String PROP_SUMMARYBAR - See Also:
- Constant Field Values
 
 - 
DEFAULT_FULLstatic final String DEFAULT_FULL - See Also:
- Constant Field Values
 
 - 
DEFAULT_FULL_ADVANCEDstatic final String DEFAULT_FULL_ADVANCED - See Also:
- Constant Field Values
 
 - 
DEFAULT_MINIMALstatic final String DEFAULT_MINIMAL - See Also:
- Constant Field Values
 
 - 
DEFAULT_MINIMAL_ADVANCEDstatic final String DEFAULT_MINIMAL_ADVANCED - Since:
- 0.9.32
- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getIdentpublic String getIdent() Retrieve the shortened 4 character ident for the router located within the current JVM at the given context.
 - 
getVersionpublic String getVersion() Retrieve the version number of the router.
 - 
getUptimepublic String getUptime() Retrieve a pretty printed uptime count (ala 4d or 7h or 39m)
 - 
allowReseedpublic boolean allowReseed() allowReseed
 - 
getAllPeerspublic int getAllPeers() subtract one for ourselves, so if we know no other peers it displays zero
 - 
getReachabilitypublic SummaryHelper.NetworkStateMessage getReachability() 
 - 
getMemorypublic String getMemory() Retrieve amount of used memory.- Since:
- 0.9.32 uncommented
 
 - 
getMemoryBarpublic String getMemoryBar() - Since:
- 0.9.32
 
 - 
getActivePeerspublic int getActivePeers() How many peers we are talking to now
 - 
showFirewallWarningpublic boolean showFirewallWarning() Should we warn about a possible firewall problem?
 - 
getActiveProfilespublic int getActiveProfiles() How many active identities have we spoken with recently
 - 
getFastPeerspublic int getFastPeers() How many active peers the router ranks as fast.
 - 
getHighCapacityPeerspublic int getHighCapacityPeers() How many active peers the router ranks as having a high capacity.
 - 
getWellIntegratedPeerspublic int getWellIntegratedPeers() How many active peers the router ranks as well integrated.
 - 
getFailingPeerspublic int getFailingPeers() How many peers the router ranks as failing.- Since:
- 0.9.32 uncommented
 
 - 
getBanlistedPeerspublic int getBanlistedPeers() How many peers are banned.- Since:
- 0.9.32 uncommented
 
 - 
getSecondKBpspublic String getSecondKBps() - Returns:
- "x.xx / y.yy {K|M}"
 
 - 
getFiveMinuteKBpspublic String getFiveMinuteKBps() - Returns:
- "x.xx / y.yy {K|M}"
 
 - 
getLifetimeKBpspublic String getLifetimeKBps() - Returns:
- "x.xx / y.yy {K|M}"
 
 - 
getInboundTransferredpublic 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)
 - 
getOutboundTransferredpublic 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)
 - 
getDestinationspublic String getDestinations() Client destinations connected locally.- Returns:
- html section summary
 
 - 
getInboundTunnelspublic int getInboundTunnels() How many free inbound tunnels we have.
 - 
getOutboundTunnelspublic int getOutboundTunnels() How many active outbound tunnels we have.
 - 
getInboundClientTunnelspublic int getInboundClientTunnels() How many inbound client tunnels we have.
 - 
getOutboundClientTunnelspublic int getOutboundClientTunnels() How many active outbound client tunnels we have.
 - 
getParticipatingTunnelspublic int getParticipatingTunnels() How many tunnels we are participating in.
 - 
getShareRatiopublic String getShareRatio() - Since:
- 0.7.10
 
 - 
getJobLagpublic String getJobLag() How lagged our job queue is over the last minute (pretty printed with the units attached)
 - 
getMessageDelaypublic String getMessageDelay() How long it takes us to pump out a message, averaged over the last minute (pretty printed with the units attached)
 - 
getTunnelLagpublic String getTunnelLag() How long it takes us to test our tunnels, averaged over the last 10 minutes (pretty printed with the units attached)
 - 
getTunnelStatuspublic String getTunnelStatus() 
 - 
getInboundBacklogpublic String getInboundBacklog() 
 - 
getUpdateStatuspublic String getUpdateStatus() The update status and buttons- Since:
- 0.8.13 moved from SummaryBarRenderer
 
 - 
getRestartStatuspublic String getRestartStatus() The restart status and buttons- Since:
- 0.8.13 moved from SummaryBarRenderer
 
 - 
getFirewallAndReseedStatuspublic String getFirewallAndReseedStatus() The firewall status and reseed status/buttons- Since:
- 0.9 moved from SummaryBarRenderer
 
 - 
storeNewsHelperpublic void storeNewsHelper(NewsHelper n) 
 - 
getNewsHelperpublic NewsHelper getNewsHelper() 
 - 
saveSummaryBarSectionsstatic void saveSummaryBarSections(RouterContext ctx, String page, Map<Integer,String> sections) 
 - 
renderSummaryBarpublic void renderSummaryBar() throws IOExceptionoutput the summary bar to _out- Throws:
- IOException
 
 - 
setActionpublic void setAction(String s) 
 - 
getActionpublic String getAction() 
 - 
setConsoleNoncepublic void setConsoleNonce(String s) 
 - 
getConsoleNoncepublic String getConsoleNonce() 
 - 
setUpdateNoncepublic void setUpdateNonce(String s) 
 - 
getUpdateNoncepublic String getUpdateNonce() 
 - 
setRequestURIpublic void setRequestURI(String s) 
 - 
getRequestURIpublic String getRequestURI() - Returns:
- non-null; "/home" if (strangely) not set by jsp
 
 - 
getConfigTablepublic String getConfigTable() 
 
- 
 
-