net.i2p.desktopgui.router

## Class RouterManager

- java.lang.Object
- - net.i2p.desktopgui.router.RouterManager

-     public class RouterManager
      extends Object

  Handle communications with the router instance. See ConfigServiceHandler for best practices on stopping the router. We don't bother notifying any Wrapper instance here.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RouterManager()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `cancelShutdown(RouterContext ctx)` Cancel a graceful shutdown or restart
    `static long` | `getShutdownTimeRemaining(RouterContext ctx)` Get time until shutdown
    `static String` | `getStatus(RouterContext ctx)` Get network status, untranslated
    `static boolean` | `isShutdownInProgress(RouterContext ctx)` Is a graceful shutdown or restart in progress?
    `static void` | `restart(RouterContext ctx)` Restart the running I2P instance.
    `static void` | `restartGracefully(RouterContext ctx)` Restart the running I2P instance.
    `static void` | `shutDown(RouterContext ctx)` Stop the running I2P instance.
    `static void` | `shutDownGracefully(RouterContext ctx)` Stop the running I2P instance.
    `static void` | `start()` Start an I2P router instance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RouterManager

          public RouterManager()

  - ### Method Detail

    - #### cancelShutdown

          public static void cancelShutdown(RouterContext ctx)

      Cancel a graceful shutdown or restart

    - #### getShutdownTimeRemaining

          public static long getShutdownTimeRemaining(RouterContext ctx)

      Get time until shutdown
      Returns:
        -1 if no shutdown in progress.

    - #### getStatus

          public static String getStatus(RouterContext ctx)

      Get network status, untranslated

    - #### isShutdownInProgress

          public static boolean isShutdownInProgress(RouterContext ctx)

      Is a graceful shutdown or restart in progress?

    - #### restart

          public static void restart(RouterContext ctx)

      Restart the running I2P instance.

    - #### restartGracefully

          public static void restartGracefully(RouterContext ctx)

      Restart the running I2P instance.

    - #### shutDown

          public static void shutDown(RouterContext ctx)

      Stop the running I2P instance.

    - #### shutDownGracefully

          public static void shutDownGracefully(RouterContext ctx)

      Stop the running I2P instance.

    - #### start

          public static void start()

      Start an I2P router instance. This method has limited knowledge (there is no I2P instance running to collect information from). It determines the I2P location using the I2PAppContext.