X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2Fquelaton%2FListPeerCommandImpl.java;h=3fb6b7460c993a0c76de8ed9b1498ccb9dce5f35;hb=90abd71ef157f31b3330d0d51664e3d14c889ccf;hp=44648c356acb241fb11d68d3568890fd6d0b591e;hpb=e591c6488b692e3dfcf2efd1905d399f39c6067f;p=jFCPlib.git diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/ListPeerCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/ListPeerCommandImpl.java index 44648c3..3fb6b74 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/ListPeerCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/ListPeerCommandImpl.java @@ -48,22 +48,22 @@ public class ListPeerCommandImpl implements ListPeerCommand { } private ListenableFuture> execute() { - return threadPool.submit(this::executeSequence); + return threadPool.submit(this::executeDialog); } - private Optional executeSequence() throws IOException, ExecutionException, InterruptedException { + private Optional executeDialog() throws IOException, ExecutionException, InterruptedException { ListPeer listPeer = new ListPeer(new RandomIdentifierGenerator().generate(), nodeIdentifier.get()); - try (ListPeerSequence listPeerSequence = new ListPeerSequence()) { - return Optional.ofNullable(listPeerSequence.send(listPeer).get()); + try (ListPeerDialog listPeerDialog = new ListPeerDialog()) { + return Optional.ofNullable(listPeerDialog.send(listPeer).get()); } } - private class ListPeerSequence extends FcpDialog { + private class ListPeerDialog extends FcpDialog { private final AtomicBoolean finished = new AtomicBoolean(); private final AtomicReference peer = new AtomicReference<>(); - public ListPeerSequence() throws IOException { + public ListPeerDialog() throws IOException { super(threadPool, connectionSupplier.get()); }