1 package org
.asamk
.signal
.commands
;
3 import com
.fasterxml
.jackson
.core
.type
.TypeReference
;
5 import net
.sourceforge
.argparse4j
.inf
.Namespace
;
7 import org
.asamk
.signal
.JsonWriter
;
8 import org
.asamk
.signal
.OutputType
;
9 import org
.asamk
.signal
.commands
.exceptions
.CommandException
;
11 import java
.util
.List
;
14 public interface JsonRpcMultiLocalCommand
extends JsonRpcMultiCommand
<Map
<String
, Object
>>, MultiLocalCommand
{
16 default TypeReference
<Map
<String
, Object
>> getRequestType() {
17 return new TypeReference
<>() {};
20 default void handleCommand(
21 Map
<String
, Object
> request
, SignalCreator c
, JsonWriter jsonWriter
22 ) throws CommandException
{
23 Namespace commandNamespace
= new JsonRpcNamespace(request
== null ? Map
.of() : request
);
24 handleCommand(commandNamespace
, c
, jsonWriter
);
27 default List
<OutputType
> getSupportedOutputTypes() {
28 return List
.of(OutputType
.PLAIN_TEXT
, OutputType
.JSON
);