net.i2p.i2pcontrol.servlets.jsonrpc2handlers

## Class RouterInfoHandler

- java.lang.Object
- - net.i2p.i2pcontrol.servlets.jsonrpc2handlers.RouterInfoHandler

- All Implemented Interfaces:
    RequestHandler

      public class RouterInfoHandler
      extends Object
      implements RequestHandler

  JSON-RPC2 handler for the RouterInfo method. Provides read-only access to router status information including version, uptime, network status, bandwidth usage, and peer statistics.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RouterInfoHandler(RouterContext ctx, JSONRPC2Helper helper)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String[]` | `handledRequests()` Gets the names of the handled JSON-RPC 2.0 request methods.
    `JSONRPC2Response` | `process(JSONRPC2Request req, MessageContext ctx)` Processes a JSON-RPC 2.0 request.

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

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

- - ### Constructor Detail

    - #### RouterInfoHandler

          public RouterInfoHandler(RouterContext ctx,
                                   JSONRPC2Helper helper)

  - ### Method Detail

    - #### handledRequests

          public String[] handledRequests()

      Description copied from interface: `RequestHandler`
      Gets the names of the handled JSON-RPC 2.0 request methods.
      Specified by:
        `handledRequests` in interface `RequestHandler`
      Returns:
        The names of the handled JSON-RPC 2.0 request methods.

    - #### process

          public JSONRPC2Response process(JSONRPC2Request req,
                                          MessageContext ctx)

      Description copied from interface: `RequestHandler`
      Processes a JSON-RPC 2.0 request.
      Specified by:
        `process` in interface `RequestHandler`
      Parameters:
        `req` - A valid JSON-RPC 2.0 request instance. Must not be `null`.
        `ctx` - Context information about the request message, may be `null` if undefined.
      Returns:
        The resulting JSON-RPC 2.0 response. It indicates success or an error, such as METHOD_NOT_FOUND.