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