import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
public class ModifyPeerNoteCommandImpl implements ModifyPeerNoteCommand {
private static final FreenetBase64 BASE_64 = new FreenetBase64();
public class ModifyPeerNoteCommandImpl implements ModifyPeerNoteCommand {
private static final FreenetBase64 BASE_64 = new FreenetBase64();
private final ListeningExecutorService threadPool;
private final ConnectionSupplier connectionSupplier;
private final ListeningExecutorService threadPool;
private final ConnectionSupplier connectionSupplier;
private final AtomicReference<String> nodeIdentifier = new AtomicReference<>();
private final AtomicReference<String> darknetComment = new AtomicReference<>();
private final AtomicReference<String> nodeIdentifier = new AtomicReference<>();
private final AtomicReference<String> darknetComment = new AtomicReference<>();
this.threadPool = MoreExecutors.listeningDecorator(threadPool);
this.connectionSupplier = connectionSupplier;
this.threadPool = MoreExecutors.listeningDecorator(threadPool);
this.connectionSupplier = connectionSupplier;
private Boolean executeDialog() throws IOException, ExecutionException, InterruptedException {
ModifyPeerNote modifyPeerNote =
private Boolean executeDialog() throws IOException, ExecutionException, InterruptedException {
ModifyPeerNote modifyPeerNote =
modifyPeerNote.setPeerNoteType(PeerNoteType.PRIVATE_DARKNET_COMMENT);
modifyPeerNote.setNoteText(BASE_64.encode(darknetComment.get().getBytes(StandardCharsets.UTF_8)));
try (ModifyPeerNoteDialog modifyPeerNoteDialog = new ModifyPeerNoteDialog()) {
modifyPeerNote.setPeerNoteType(PeerNoteType.PRIVATE_DARKNET_COMMENT);
modifyPeerNote.setNoteText(BASE_64.encode(darknetComment.get().getBytes(StandardCharsets.UTF_8)));
try (ModifyPeerNoteDialog modifyPeerNoteDialog = new ModifyPeerNoteDialog()) {