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