CompletableFuture.supplyAsync(SupplierWrapper.of(()->{return"SupplierWrapper";})).thenAcceptAsync(ConsumerWrapper.of(c ->{// your code visit(url)System.out.println("ConsumerWrapper");}));
or
CompletableFuture.supplyAsync(SupplierWrapper.of(()->{return"SupplierWrapper";})).thenApplyAsync(FunctionWrapper.of(f ->{// your code visit(url)return"FunctionWrapper";}));