private final int id;
private final MiIoCommand command;
private final JsonObject commandJson;
+ private final String sender;
private @Nullable JsonObject response;
private String cloudServer = "";
this.response = response;
}
- public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand) {
+ public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand, String sender) {
this.id = id;
this.command = command;
this.commandJson = fullCommand;
+ this.sender = sender;
}
- public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand, String cloudServer) {
+ public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand, String cloudServer, String sender) {
this.id = id;
this.command = command;
this.commandJson = fullCommand;
this.cloudServer = cloudServer;
+ this.sender = sender;
}
public int getId() {
public void setCloudServer(String cloudServer) {
this.cloudServer = cloudServer;
}
+
+ public String getSender() {
+ return sender;
+ }
}
fullCommand.add("params", JsonParser.parseString(params));
}
MiIoSendCommand sendCmd = new MiIoSendCommand(cmdId, MiIoCommand.getCommand(command), fullCommand,
- cloudServer);
+ cloudServer, sender);
concurrentLinkedQueue.add(sendCmd);
if (logger.isDebugEnabled()) {
// Obfuscate part of the token to allow sharing of the logfiles