From: David ‘Bombe’ Roden Date: Mon, 13 Jul 2015 18:45:35 +0000 (+0200) Subject: Rename all remaining occurences of “sequence” to “dialog” X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=90abd71ef157f31b3330d0d51664e3d14c889ccf;p=jFCPlib.git Rename all remaining occurences of “sequence” to “dialog” --- diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/AddPeerCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/AddPeerCommandImpl.java index a54f166..4fab83c 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/AddPeerCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/AddPeerCommandImpl.java @@ -55,10 +55,10 @@ public class AddPeerCommandImpl implements AddPeerCommand { } 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 { AddPeer addPeer; if (file.get() != null) { addPeer = new AddPeer(new RandomIdentifierGenerator().generate(), file.get().getPath()); @@ -67,17 +67,17 @@ public class AddPeerCommandImpl implements AddPeerCommand { } else { addPeer = new AddPeer(new RandomIdentifierGenerator().generate(), nodeRef.get()); } - try (AddPeerSequence addPeerSequence = new AddPeerSequence()) { - return addPeerSequence.send(addPeer).get(); + try (AddPeerDialog addPeerDialog = new AddPeerDialog()) { + return addPeerDialog.send(addPeer).get(); } } - private class AddPeerSequence extends FcpDialog> { + private class AddPeerDialog extends FcpDialog> { private final AtomicBoolean finished = new AtomicBoolean(); private final AtomicReference peer = new AtomicReference<>(); - public AddPeerSequence() throws IOException { + public AddPeerDialog() throws IOException { super(threadPool, connectionSupplier.get()); } diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/ClientHelloImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/ClientHelloImpl.java index 3ded685..cb85f60 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/ClientHelloImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/ClientHelloImpl.java @@ -44,8 +44,8 @@ public class ClientHelloImpl { FcpConnection connection = new FcpConnection(hostname, port); connection.connect(); ClientHello clientHello = new ClientHello(clientName.get(), "2.0"); - try (ClientHelloDialog nodeHelloSequence = new ClientHelloDialog(connection)) { - if (nodeHelloSequence.send(clientHello).get()) { + try (ClientHelloDialog clientHelloDialog = new ClientHelloDialog(connection)) { + if (clientHelloDialog.send(clientHello).get()) { return connection; } } catch (InterruptedException | ExecutionException e) { diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/FcpDialog.java b/src/main/java/net/pterodactylus/fcp/quelaton/FcpDialog.java index 2aa003c..47319f0 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/FcpDialog.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/FcpDialog.java @@ -57,7 +57,7 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; /** - * An FCP reply sequence enables you to conveniently wait for a specific set of FCP replies. + * An FCP dialog enables you to conveniently wait for a specific set of FCP replies. * * @author David ‘Bombe’ Roden */ diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/GenerateKeypairCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/GenerateKeypairCommandImpl.java index 5f8cd5b..69fcf63 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/GenerateKeypairCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/GenerateKeypairCommandImpl.java @@ -30,10 +30,10 @@ class GenerateKeypairCommandImpl implements GenerateKeypairCommand { @Override public ListenableFuture execute() { - return threadPool.submit(this::executeSequence); + return threadPool.submit(this::executeDialog); } - private FcpKeyPair executeSequence() throws InterruptedException, ExecutionException, IOException { + private FcpKeyPair executeDialog() throws InterruptedException, ExecutionException, IOException { try (FcpKeyPairDialog fcpKeyPairDialog = new FcpKeyPairDialog()) { return fcpKeyPairDialog.send(new GenerateSSK()).get(); } diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java index 025cddc..3e9e850 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java @@ -51,10 +51,10 @@ public class GetNodeCommandImpl implements GetNodeCommand { @Override public ListenableFuture execute() { - return threadPool.submit(this::executeSequence); + return threadPool.submit(this::executeDialog); } - private NodeData executeSequence() throws InterruptedException, ExecutionException, IOException { + private NodeData executeDialog() throws InterruptedException, ExecutionException, IOException { GetNode getNode = new GetNode(new RandomIdentifierGenerator().generate(), giveOpennetRef.get(), includePrivate.get(), includeVolatile.get()); try (GetNodeDialog getNodeDialog = new GetNodeDialog()) { 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()); } diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/ListPeerNotesCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/ListPeerNotesCommandImpl.java index 426917a..0cd0483 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/ListPeerNotesCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/ListPeerNotesCommandImpl.java @@ -51,10 +51,10 @@ public class ListPeerNotesCommandImpl implements ListPeerNotesCommand { } 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 { ListPeerNotes listPeerNotes = new ListPeerNotes(new RandomIdentifierGenerator().generate(), nodeIdentifier.get()); try (ListPeerNotesDialog listPeerNotesDialog = new ListPeerNotesDialog()) { diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/ListPeersCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/ListPeersCommandImpl.java index 921c0fa..f4907f0 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/ListPeersCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/ListPeersCommandImpl.java @@ -46,10 +46,10 @@ public class ListPeersCommandImpl implements ListPeersCommand { @Override public ListenableFuture> execute() { - return threadPool.submit(this::executeSequence); + return threadPool.submit(this::executeDialog); } - private Collection executeSequence() throws InterruptedException, ExecutionException, IOException { + private Collection executeDialog() throws InterruptedException, ExecutionException, IOException { String identifier = new RandomIdentifierGenerator().generate(); ListPeers listPeers = new ListPeers(identifier, includeMetadata.get(), includeVolatile.get()); try (ListPeersDialog listPeersDialog = new ListPeersDialog()) { diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/ModifyPeerCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/ModifyPeerCommandImpl.java index 5dd2bf9..a675280 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/ModifyPeerCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/ModifyPeerCommandImpl.java @@ -115,10 +115,10 @@ public class ModifyPeerCommandImpl implements ModifyPeerCommand { } 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 { ModifyPeer modifyPeer = new ModifyPeer(new RandomIdentifierGenerator().generate(), nodeIdentifier.get()); Optional.ofNullable(enabled.get()).ifPresent(enabled -> modifyPeer.setEnabled(enabled)); Optional.ofNullable(allowLocalAddresses.get()).ifPresent(allowed -> modifyPeer.setAllowLocalAddresses(allowed));