Package org.consensusj.jsonrpc.cli
Class BaseJsonRpcTool
java.lang.Object
org.consensusj.jsonrpc.cli.BaseJsonRpcTool
- All Implemented Interfaces:
ToolProvider
- Direct Known Subclasses:
BitcoinCLITool
,GenericJsonRpcTool
An abstract base class for JsonRpcClientTool that uses Apache Commons CLI
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final URI
protected final org.apache.commons.cli.HelpFormatter
protected JsonRpcMessage.Version
protected org.consensusj.jsonrpc.cli.JsonRpcClientTool.OutputObject
protected final org.consensusj.jsonrpc.cli.JsonRpcClientTool.OutputStyle
protected final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.consensusj.jsonrpc.cli.JsonRpcClientTool.Call
createCall
(PrintStream out, PrintStream err, String... args) createCall
(PrintWriter out, PrintWriter err, String... args) name()
abstract org.apache.commons.cli.Options
options()
void
printError
(org.consensusj.jsonrpc.cli.JsonRpcClientTool.Call call, String str) void
default int
run
(PrintWriter out, PrintWriter err, String... args) void
void
run
(org.consensusj.jsonrpc.cli.JsonRpcClientTool.Call call) usage()
default PrintWriter
writerFromStream
(PrintStream stream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.spi.ToolProvider
description, run
-
Field Details
-
defaultUri
-
usage
- See Also:
-
formatter
-
jsonRpcVersion
-
outputObject
-
outputStyle
-
-
Constructor Details
-
BaseJsonRpcTool
public BaseJsonRpcTool()
-
-
Method Details
-
name
- Specified by:
name
in interfaceToolProvider
-
usage
-
options
-
createCall
-
run
-
run
-
printHelp
-
printError
-
run
- Specified by:
run
in interfaceToolProvider
-
createCall
default org.consensusj.jsonrpc.cli.JsonRpcClientTool.Call createCall(PrintStream out, PrintStream err, String... args) -
writerFromStream
-