@Test public void testPassingTask() { ClientSessionExecutor executor = new ClientSessionExecutorImpl(Executors.newSingleThreadExecutor()); executor.runLaterInClientSession(new Runnable() { @Override public void run() { } }); }
@Override public CompletableFuture<Void> runLaterInClientSession(final Runnable task) { Assert.requireNonNull(task, "task"); return callLaterInClientSession(new Callable<Void>() { @Override public Void call() throws Exception { task.run(); return null; } }); }
ClientSessionExecutorImpl implements ClientSessionExecutor { @Override public CompletableFuture<Void> runLaterInClientSession(final Runnable task) { Assert.requireNonNull(task, "task"); return callLaterInClientSession(new Callable<Void>() { @Override public Void call() throws Exception { task.run(); return null; } }); } }
ClientSessionExecutorImpl implements ClientSessionExecutor { @Override public CompletableFuture<Void> runLaterInClientSession(final Runnable task) { Assert.requireNonNull(task, "task"); return callLaterInClientSession(new Callable<Void>() { @Override public Void call() throws Exception { task.run(); return null; } }); } ClientSessionExecutorImpl(final Executor runLaterExecutor); }
ClientSessionExecutorImpl implements ClientSessionExecutor { @Override public CompletableFuture<Void> runLaterInClientSession(final Runnable task) { Assert.requireNonNull(task, "task"); return callLaterInClientSession(new Callable<Void>() { @Override public Void call() throws Exception { task.run(); return null; } }); } ClientSessionExecutorImpl(final Executor runLaterExecutor); @Override CompletableFuture<Void> runLaterInClientSession(final Runnable task); @Override CompletableFuture<T> callLaterInClientSession(final Callable<T> task); }
ClientSessionExecutorImpl implements ClientSessionExecutor { @Override public CompletableFuture<Void> runLaterInClientSession(final Runnable task) { Assert.requireNonNull(task, "task"); return callLaterInClientSession(new Callable<Void>() { @Override public Void call() throws Exception { task.run(); return null; } }); } ClientSessionExecutorImpl(final Executor runLaterExecutor); @Override CompletableFuture<Void> runLaterInClientSession(final Runnable task); @Override CompletableFuture<T> callLaterInClientSession(final Callable<T> task);  }