void (String[] args) { final ExecutorService threadPool = Executors.newCachedThreadPool(); final List<EventObject> events = new ArrayList<>(); final SoapInterface soap = new SoapInterface(); events.stream() .map(event -> get(event).apply(soap, event)) .map(threadPool::submit) .forEachOrdered(future -> { try { if (! future.get().isError()) { } else { ; } } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } }); }