Commit graph

37 commits

Author SHA1 Message Date
AsamK
7cc0ef1c70 Improve error message and log output for failed jsonrpc commands 2024-09-08 08:30:31 +02:00
AsamK
caa4fa0180 Fix inspection issues 2023-12-15 17:32:30 +01:00
AsamK
7e9940be4a Refactor DaemonCommand 2023-11-10 15:32:45 +01:00
AsamK
c0aa338d7c Reorder static final modifier 2023-11-10 14:03:13 +01:00
AsamK
699b21f066 Handle rate limit error in JSON-RPC mode 2023-11-05 16:20:33 +01:00
AsamK
ed8ac5b84c Use new threads API 2023-10-24 17:36:32 +02:00
AsamK
8d55dfb66b Use pattern matching switch cases 2023-10-24 17:36:32 +02:00
AsamK
d51dd7ae57 Use .isEmpty() for checking lists and strings 2023-10-17 20:34:21 +02:00
AsamK
6f4d538832 Execute JSON-RPC requests in parallel 2023-10-05 22:18:13 +02:00
AsamK
fd851ba6cb Fix batch response in case of empty responses list
This adapts the implementation to the JSON-RPC specification.
2023-09-23 11:52:37 +02:00
AsamK
87e79bceaa Fix output format of jsonrpc receive notification
Fixes #1313
2023-08-26 17:17:25 +02:00
AsamK
b51c791629 Adapt receive subscription notification to have payload in result field 2023-08-11 00:36:22 +02:00
AsamK
210466e7d9 Allow JSON-RPC commands without account param if only one account exists 2022-12-30 13:50:40 +01:00
ced-b
1ad0e94b64
Exposing Signal CLI as HTTP Server (#1078)
* Add initial proof of concept for http server

* Add support for registration commands

* Add support  for MultiLocalCommands

* Improve handling of HTTP responses

Makes it so that responses area all uniformly JSON and wrapped
into the proper response envelope.

* Add caching for workflows

* Run http server with daemon command

This fits the existing command line API better

* Wrap the existing JSON RPC handler in HTTP Service

This is a redesign of earlier attempts to make an HTTP service. Fixing
that service turned out that it would have to be a copy of the
SignalJsonRpcDispatcherHandler. So instead of copy pasting all the
code the existing service is simply being wrapped.

* Switch http server to use command handler

* Clean up and simplification

* Pass full InetSocketAddress

* Minor fixes and improvements

Based on code review.

Co-authored-by: cedb <cedb@keylimebox.org>
2022-11-02 17:44:12 +01:00
AsamK
bf76c04664 Refactor JsonRpcReader to for handling a single message 2022-11-01 18:06:40 +01:00
AsamK
ae678871ec Extract JSON-RPC command handler 2022-11-01 17:10:15 +01:00
AsamK
c8cd36bde8 Unsubscribe receive if jsonRpcSender channel is closed 2022-06-08 17:51:18 +02:00
AsamK
be0993c5d8 Improve JSON-RPC subscribeReceive method with subscription id 2022-02-01 20:59:49 +01:00
AsamK
f9ecaa8ad6 Add workaround for jsonrpc clients that send null params 2021-12-22 19:18:42 +01:00
AsamK
62687d103f Replace collect(Collectors.toList()) with toList() 2021-12-11 13:10:39 +01:00
AsamK
6c1013b024 Improve error message when an account is already in use 2021-12-05 12:00:49 +01:00
AsamK
f58f85ef60 Return json response if available in error data field 2021-11-14 15:24:21 +01:00
AsamK
fc8b6d0fcb Clean up base package 2021-11-14 15:00:06 +01:00
AsamK
c73c58723c Implement unregister command for jsonrpc and dbus daemon 2021-11-12 16:07:35 +01:00
AsamK
b7005884fd Implement startLink and finishLink for jsonrpc daemon 2021-11-11 19:15:20 +01:00
AsamK
79cc225869 Implement register and verify commands for json rpc 2021-11-11 19:14:32 +01:00
AsamK
4a1af0786c Add MultiAccountManager 2021-11-11 16:10:22 +01:00
AsamK
62dd2ee49e Add listAccounts command 2021-11-10 20:15:18 +01:00
AsamK
9c67aabebb Add JsonRpcMultiCommand 2021-11-10 20:12:27 +01:00
AsamK
64af4914ee Rename JsonRpcCommand class 2021-11-10 17:11:16 +01:00
AsamK
81a11dc977 Implement socket/tcp for daemon command 2021-11-10 12:12:35 +01:00
AsamK
9c86baf0ea Rename jsonrpc bulk to batch message 2021-11-09 14:22:47 +01:00
AsamK
e7a4bc5ef1 Extend logging in JsonRpcReader 2021-11-08 22:16:45 +01:00
AsamK
510965589b Extract SignalJsonRpcDispatcherHandler 2021-11-07 12:22:53 +01:00
AsamK
ce70a623c2 Use Java 17 2021-10-27 14:39:40 +02:00
AsamK
19f7b5d78d Log a debug message when dropping json rpc response for request without id 2021-08-20 19:04:35 +02:00
AsamK
a8bbdb54d0 Implement jsonRpc command
Co-authored-by: technillogue <technillogue@gmail.com>

Closes #668
2021-08-10 18:16:50 +02:00