nxt.http

## Class StartFundingMonitor

- java.lang.Object
- - nxt.http.APIServlet.APIRequestHandler
  - - nxt.http.StartFundingMonitor

-     public final class StartFundingMonitor
      extends APIServlet.APIRequestHandler

  Start a funding monitor

  A funding monitor will transfer COIN, ASSET or CURRENCY from the funding account to a recipient account when the amount held by the recipient account drops below the threshold. The transfer will not be done until the current block height is greater than equal to the block height of the last transfer plus the interval. Holding type codes are listed in getConstants. The asset or currency is specified by the holding identifier.

  The funding account is identified by the secret phrase. The secret phrase must be specified since the funding monitor needs to sign the transactions that it submits.

  The recipient accounts are identified by the specified account property. Each account that has this property set by the funding account will be monitored for changes. The property value can be omitted or it can consist of a JSON string containing one or more values in the format: {"amount":long,"threshold":long,"interval":integer}

  The long values can be specified as numeric values or as strings.

  For example, {"amount":25,"threshold":10,"interval":1440}. The specified values will override the default values specified when the account monitor is started.

  Coin, Asset and Currency decimal places are determined by the chain, asset or currency definition.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `allowRequiredBlockParameters()`
    `protected org.json.simple.JSONStreamAware` | `processRequest(javax.servlet.http.HttpServletRequest req)` Process the request
    `protected boolean` | `requireFullClient()`
    `protected boolean` | `requirePost()`

    - ### Methods inherited from class nxt.http.APIServlet.APIRequestHandler

      `getAPITags, getFileParameter, getParameters, isChainSpecific, isIgnisOnly, isPassword, isTextArea, processRequest, requireBlockchain, requirePassword, startDbTransaction`

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

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

- - ### Method Detail

    - #### processRequest

          protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req)
                                                            throws NxtException

      Process the request
      Specified by:
        `processRequest` in class `APIServlet.APIRequestHandler`
      Parameters:
        `req` - Client request
      Returns:
        Client response
      Throws:
        `NxtException` - Unable to process request

    - #### requirePost

          protected boolean requirePost()

      Overrides:
        `requirePost` in class `APIServlet.APIRequestHandler`

    - #### allowRequiredBlockParameters

          protected boolean allowRequiredBlockParameters()

      Overrides:
        `allowRequiredBlockParameters` in class `APIServlet.APIRequestHandler`

    - #### requireFullClient

          protected boolean requireFullClient()

      Overrides:
        `requireFullClient` in class `APIServlet.APIRequestHandler`