示例#1
0
  @Override
  public ListenableFuture<List<String>> echo() {
    String id = java.util.UUID.randomUUID().toString();
    String echoString = JsonRpcWriterUtil.echoStr(id);

    SettableFuture<List<String>> sf = SettableFuture.create();
    requestResult.put(id, sf);
    requestMethod.put(id, "echo");

    channel.writeAndFlush(echoString);
    return sf;
  }