Rename all remaining occurences of “sequence” to “dialog”
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 13 Jul 2015 18:45:35 +0000 (20:45 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 13 Jul 2015 18:45:35 +0000 (20:45 +0200)
src/main/java/net/pterodactylus/fcp/quelaton/AddPeerCommandImpl.java
src/main/java/net/pterodactylus/fcp/quelaton/ClientHelloImpl.java
src/main/java/net/pterodactylus/fcp/quelaton/FcpDialog.java
src/main/java/net/pterodactylus/fcp/quelaton/GenerateKeypairCommandImpl.java
src/main/java/net/pterodactylus/fcp/quelaton/GetNodeCommandImpl.java
src/main/java/net/pterodactylus/fcp/quelaton/ListPeerCommandImpl.java
src/main/java/net/pterodactylus/fcp/quelaton/ListPeerNotesCommandImpl.java
src/main/java/net/pterodactylus/fcp/quelaton/ListPeersCommandImpl.java
src/main/java/net/pterodactylus/fcp/quelaton/ModifyPeerCommandImpl.java

index a54f166..4fab83c 100644 (file)
@@ -55,10 +55,10 @@ public class AddPeerCommandImpl implements AddPeerCommand {
        }
 
        private ListenableFuture<Optional<Peer>> execute() {
-               return threadPool.submit(this::executeSequence);
+               return threadPool.submit(this::executeDialog);
        }
 
-       private Optional<Peer> executeSequence() throws IOException, ExecutionException, InterruptedException {
+       private Optional<Peer> 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<Optional<Peer>> {
+       private class AddPeerDialog extends FcpDialog<Optional<Peer>> {
 
                private final AtomicBoolean finished = new AtomicBoolean();
                private final AtomicReference<Peer> peer = new AtomicReference<>();
 
-               public AddPeerSequence() throws IOException {
+               public AddPeerDialog() throws IOException {
                        super(threadPool, connectionSupplier.get());
                }
 
index 3ded685..cb85f60 100644 (file)
@@ -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) {
index 2aa003c..47319f0 100644 (file)
@@ -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 <a href="bombe@freenetproject.org">David ‘Bombe’ Roden</a>
  */
index 5f8cd5b..69fcf63 100644 (file)
@@ -30,10 +30,10 @@ class GenerateKeypairCommandImpl implements GenerateKeypairCommand {
 
        @Override
        public ListenableFuture<FcpKeyPair> 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();
                }
index 025cddc..3e9e850 100644 (file)
@@ -51,10 +51,10 @@ public class GetNodeCommandImpl implements GetNodeCommand {
 
        @Override
        public ListenableFuture<NodeData> 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()) {
index 44648c3..3fb6b74 100644 (file)
@@ -48,22 +48,22 @@ public class ListPeerCommandImpl implements ListPeerCommand {
        }
 
        private ListenableFuture<Optional<Peer>> execute() {
-               return threadPool.submit(this::executeSequence);
+               return threadPool.submit(this::executeDialog);
        }
 
-       private Optional<Peer> executeSequence() throws IOException, ExecutionException, InterruptedException {
+       private Optional<Peer> 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<Peer> {
+       private class ListPeerDialog extends FcpDialog<Peer> {
 
                private final AtomicBoolean finished = new AtomicBoolean();
                private final AtomicReference<Peer> peer = new AtomicReference<>();
 
-               public ListPeerSequence() throws IOException {
+               public ListPeerDialog() throws IOException {
                        super(threadPool, connectionSupplier.get());
                }
 
index 426917a..0cd0483 100644 (file)
@@ -51,10 +51,10 @@ public class ListPeerNotesCommandImpl implements ListPeerNotesCommand {
        }
 
        private ListenableFuture<Optional<PeerNote>> execute() {
-               return threadPool.submit(this::executeSequence);
+               return threadPool.submit(this::executeDialog);
        }
 
-       private Optional<PeerNote> executeSequence() throws IOException, ExecutionException, InterruptedException {
+       private Optional<PeerNote> executeDialog() throws IOException, ExecutionException, InterruptedException {
                ListPeerNotes listPeerNotes =
                        new ListPeerNotes(new RandomIdentifierGenerator().generate(), nodeIdentifier.get());
                try (ListPeerNotesDialog listPeerNotesDialog = new ListPeerNotesDialog()) {
index 921c0fa..f4907f0 100644 (file)
@@ -46,10 +46,10 @@ public class ListPeersCommandImpl implements ListPeersCommand {
 
        @Override
        public ListenableFuture<Collection<Peer>> execute() {
-               return threadPool.submit(this::executeSequence);
+               return threadPool.submit(this::executeDialog);
        }
 
-       private Collection<Peer> executeSequence() throws InterruptedException, ExecutionException, IOException {
+       private Collection<Peer> executeDialog() throws InterruptedException, ExecutionException, IOException {
                String identifier = new RandomIdentifierGenerator().generate();
                ListPeers listPeers = new ListPeers(identifier, includeMetadata.get(), includeVolatile.get());
                try (ListPeersDialog listPeersDialog = new ListPeersDialog()) {
index 5dd2bf9..a675280 100644 (file)
@@ -115,10 +115,10 @@ public class ModifyPeerCommandImpl implements ModifyPeerCommand {
        }
 
        private ListenableFuture<Optional<Peer>> execute() {
-               return threadPool.submit(this::executeSequence);
+               return threadPool.submit(this::executeDialog);
        }
 
-       private Optional<Peer> executeSequence() throws IOException, ExecutionException, InterruptedException {
+       private Optional<Peer> 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));