Class JSONRPC2Helper


  • public class JSONRPC2Helper
    extends Object
    • Field Detail

      • USE_NO_AUTH

        public static final Boolean USE_NO_AUTH
      • USE_AUTH

        public static final Boolean USE_AUTH
    • Constructor Detail

    • Method Detail

      • validateParams

        public JSONRPC2Error validateParams​(String[] requiredArgs,
                                            JSONRPC2Request req,
                                            Boolean useAuth)
        Check incoming request for required arguments, to make sure they are valid.
        Parameters:
        requiredArgs - - Array of names of required arguments. If null don't check for any parameters.
        req - - Incoming JSONRPC2 request
        useAuth - - If true, will validate authentication token.
        Returns:
        - null if no errors were found. Corresponding JSONRPC2Error if error is found.
      • validateParams

        public JSONRPC2Error validateParams​(String[] requiredArgs,
                                            JSONRPC2Request req)
        Check incoming request for required arguments, to make sure they are valid. Will authenticate req.
        Parameters:
        requiredArgs - - Array of names of required arguments. If null don't check for any parameters.
        req - - Incoming JSONRPC2 request
        Returns:
        - null if no errors were found. Corresponding JSONRPC2Error if error is found.