Rename all remaining occurences of “sequence” to “dialog”
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / quelaton / AddPeerCommandImpl.java
index 5dfef6f..4fab83c 100644 (file)
@@ -19,7 +19,7 @@ import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.common.util.concurrent.MoreExecutors;
 
 /**
- * Default {@link AddPeerCommand} implementation based on {@link FcpReplySequence}.
+ * Default {@link AddPeerCommand} implementation based on {@link FcpDialog}.
  *
  * @author <a href="mailto:bombe@freenetproject.org">David ‘Bombe’ Roden</a>
  */
@@ -55,11 +55,11 @@ 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 {
-               AddPeer addPeer = null;
+       private Optional<Peer> executeDialog() throws IOException, ExecutionException, InterruptedException {
+               AddPeer addPeer;
                if (file.get() != null) {
                        addPeer = new AddPeer(new RandomIdentifierGenerator().generate(), file.get().getPath());
                } else if (url.get() != null) {
@@ -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 FcpReplySequence<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());
                }