Class UPnPManager

java.lang.Object
net.i2p.router.transport.UPnPManager

class UPnPManager extends Object
Bridge from the I2P RouterAddress data structure to the freenet data structures
Since:
0.7.4
Author:
zzz
  • Constructor Details

  • Method Details

    • start

      public void start()
      Blocking, may take a while. May be called even if already running.
    • stop

      public void stop()
      Blocking, may take a while, up to 20 seconds
    • rescan

      public boolean rescan()
      Call when IP or network connectivity might have changed. Starts UPnP if previous start failed, else starts a search. Must have called start() first, and not called stop(). Should be fast. This only starts the search, the responses will come in over the MX time (3 seconds).
      Returns:
      true if a rescan was actually fired off
      Since:
      0.9.18
    • update

      public void update(Set<TransportManager.Port> ports)
      Call when the ports might have changed The transports can call this pretty quickly at startup, which can have multiple UPnP threads running at once, but that should be ok.
    • renderStatusHTML

      public String renderStatusHTML()
      Warning - blocking, very slow, queries the active router, will take many seconds if it has vanished.