示例#1
0
 @Override
 @SuppressWarnings("unchecked")
 public <T> CompletableFuture<T> submit(Query<T> query) {
   return protocol.submit(ResourceQuery.builder().withResource(resource).withQuery(query).build());
 }
示例#2
0
 @Override
 public CompletableFuture<Void> delete() {
   return protocol
       .submit(DeleteResource.builder().withResource(resource).build())
       .thenApply(deleted -> null);
 }
示例#3
0
 @Override
 @SuppressWarnings("unchecked")
 public <T> CompletableFuture<T> submit(Command<T> command) {
   return protocol.submit(
       ResourceCommand.builder().withResource(resource).withCommand(command).build());
 }