mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
22 lines
559 B
Java
22 lines
559 B
Java
package org.asamk.signal.commands;
|
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
|
import org.asamk.signal.OutputType;
|
|
import org.asamk.signal.commands.exceptions.CommandException;
|
|
import org.asamk.signal.manager.Manager;
|
|
|
|
import java.util.Set;
|
|
|
|
public interface JsonRpcCommand<T> extends Command {
|
|
|
|
default TypeReference<T> getRequestType() {
|
|
return null;
|
|
}
|
|
|
|
void handleCommand(T request, Manager m) throws CommandException;
|
|
|
|
default Set<OutputType> getSupportedOutputTypes() {
|
|
return Set.of(OutputType.JSON);
|
|
}
|
|
}
|