java.lang.Object
net.i2p.router.web.HelperBase
net.i2p.router.web.helpers.InfoHelper

public class InfoHelperextends HelperBase
Helper for router information page rendering and form processing.
  • Field Details

    • _full

      private boolean _full
      Set when the full status page is shown.
  • Constructor Details

    • InfoHelper

      public InfoHelper()
      Create a helper for the router information page.
  • Method Details

    • setFull

      public void setFull(String f)
      Record whether the page renders in full rather than as a summary.
      Parameters:
      f - the flag; any non-null, non-empty value counts as true
    • getConsole

      public String getConsole()
      Render the router status page, or write it to the output stream.
      Returns:
      the console as HTML, or an empty string when it was written directly to the output stream instead
    • getStats

      public String getStats()
      Render the bandwidth and peer statistics section.
      Returns:
      the stats as HTML
    • getUdpIP

      public String getUdpIP()
      The host part of the address the transport is published under.
      Returns:
      host or "unknown"
    • lastCountry

      public String lastCountry()
      The country code of the last tunnel or peer this router saw.
      Returns:
      the country code, or null when none has been recorded
    • getUdpPort

      public String getUdpPort()
      The port the UDP transport is published under.
      Returns:
      the udp port
    • firstInstalled

      public String firstInstalled()
      When this router was first installed.
      Returns:
      the date, or null when it has never been recorded
    • firstVersion

      public String firstVersion()
      The version running when this router was first installed.
      Returns:
      the version, or null when it has never been recorded
    • lastUpdated

      public String lastUpdated()
      When an update was last installed.
      Returns:
      the date, or null when no update has been installed
    • updatePolicy

      public String updatePolicy()
      The update policy in force.
      Returns:
      the policy, or null when none has been set
    • updateDevSU3

      public String updateDevSU3()
      Whether development SU3 updates are offered.
      Returns:
      the stored setting, or null when it has never been set
    • updateUnsigned

      public String updateUnsigned()
      Whether updates may be installed without a signature.
      Returns:
      the stored setting, or "true" when it has never been set
    • isRouterSlow

      public boolean isRouterSlow()
      Whether this machine is too slow to run a router well.
      Returns:
      whether router slow
    • getCoreCount

      public String getCoreCount()
      The number of processor cores available to the router.
      Returns:
      the core count
    • bwIn

      public String bwIn()
      The inbound bandwidth limit in force.
      Returns:
      the limit in KB/s, or the built-in default when unset
    • bwOut

      public String bwOut()
      The outbound bandwidth limit in force.
      Returns:
      the limit in KB/s, or the built-in default when unset
    • bwShare

      public String bwShare()
      The share of total bandwidth offered to other routers.
      Returns:
      the share percentage, or the built-in default when unset
    • codelInterval

      public String codelInterval()
      The CoDel queue target interval in force.
      Returns:
      the interval in ms, or the built-in default when unset
    • codelTarget

      public String codelTarget()
      The CoDel queue delay target in force.
      Returns:
      the target in ms, or the built-in default when unset
    • getFamily

      public String getFamily()
      The address family this router publishes, as set in its RouterInfo.
      Returns:
      the family name, or null when the RouterInfo omits it
    • getGeoIPBuildInfo

      public String getGeoIPBuildInfo()
      The build date of the GeoIP database in use.
      Returns:
      the geo IP build info
    • getASNBuildInfo

      public String getASNBuildInfo()
      The build date of the ASN database in use.
      Returns:
      the a s n build info
    • renderStatusHTML

      private void renderStatusHTML(Writer out) throws IOException
      Writes the status page's HTML.
      Parameters:
      out - where the page is written
      Throws:
      IOException - if the writer fails