net.i2p.i2pcontrol.servlets

## Class JSONRPC2Servlet

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - net.i2p.i2pcontrol.servlets.JSONRPC2Servlet

- All Implemented Interfaces:
    Serializable, Servlet, ServletConfig

      public class JSONRPC2Servlet
      extends HttpServlet

  Provide an JSON-RPC 2.0 API for remote controlling of I2P
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSONRPC2Servlet()` Webapp
    `JSONRPC2Servlet(RouterContext ctx, SecurityManager secMan)` Plugin

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()`
    `protected void` | `doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)`
    `protected void` | `doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)`
    `void` | `init()`

    - ### Methods inherited from class javax.servlet.http.HttpServlet

      `doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service`

    - ### Methods inherited from class javax.servlet.GenericServlet

      `getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

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

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

- - ### Constructor Detail

    - #### JSONRPC2Servlet

          public JSONRPC2Servlet()

      Webapp

    - #### JSONRPC2Servlet

          public JSONRPC2Servlet(RouterContext ctx,
                                 SecurityManager secMan)

      Plugin

  - ### Method Detail

    - #### destroy

          public void destroy()

      Specified by:
        `destroy` in interface `Servlet`
      Overrides:
        `destroy` in class `GenericServlet`

    - #### doGet

          protected void doGet(HttpServletRequest httpServletRequest,
                               HttpServletResponse httpServletResponse)
                        throws ServletException,
                               IOException

      Overrides:
        `doGet` in class `HttpServlet`
      Throws:
        `ServletException`
        `IOException`

    - #### doPost

          protected void doPost(HttpServletRequest httpServletRequest,
                                HttpServletResponse httpServletResponse)
                         throws ServletException,
                                IOException

      Overrides:
        `doPost` in class `HttpServlet`
      Throws:
        `ServletException`
        `IOException`

    - #### init

          public void init()
                    throws ServletException

      Overrides:
        `init` in class `GenericServlet`
      Throws:
        `ServletException`