Пример #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());
 }